mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
libs: utils: return NULL if failed to get surface formats
Thus, when generating the allowed caps, the element will throw a warning and it will use its caps template. This behavior might be a bug in the VA driver. https://bugzilla.gnome.org/show_bug.cgi?id=775490
This commit is contained in:
parent
65c16145a5
commit
a5650e8dc3
1 changed files with 5 additions and 1 deletions
|
@ -139,6 +139,11 @@ gst_vaapi_get_surface_formats (GstVaapiDisplay * display, VAConfigID config)
|
|||
g_array_append_val (formats, fmt);
|
||||
}
|
||||
|
||||
if (formats->len == 0) {
|
||||
g_array_unref (formats);
|
||||
formats = NULL;
|
||||
}
|
||||
|
||||
g_free (surface_attribs);
|
||||
return formats;
|
||||
|
||||
|
@ -149,5 +154,4 @@ error:
|
|||
}
|
||||
#endif
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue