diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c index 86d28eecc1..a1dbad86e1 100644 --- a/gst/vaapi/gstvaapipluginutil.c +++ b/gst/vaapi/gstvaapipluginutil.c @@ -99,13 +99,8 @@ gst_vaapi_create_display(GstVaapiDisplayType *display_type) 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)