plugins: simlpify gst_vaapi_create_display() helper.

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.
This commit is contained in:
Gwenole Beauchesne 2013-07-15 11:58:31 +02:00
parent 3d290a162c
commit cee9101dd8

View file

@ -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)