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
@ -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…
x
Reference in New Issue
Block a user