mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
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:
parent
3d290a162c
commit
cee9101dd8
1 changed files with 2 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue