Simplify gst_vaapi_create_display() helper as gst_vaapi_display_XXX_new()
performs the necessary validation checks for the underlying VA display
prior to returning to the caller. So, if an error occurred, then NULL is
really returned in that case.
display = m->create_display(NULL);
if (display) {
- /* FIXME: allocator should return NULL if an error occurred */
- if (gst_vaapi_display_get_display(display)) {
- *display_type = m->type;
- break;
- }
- gst_vaapi_display_unref(display);
- display = NULL;
+ *display_type = m->type;
+ break;
}
if (display_type != GST_VAAPI_DISPLAY_TYPE_ANY)