mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
display: don't crash when config is empty.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
feaa38e22b
commit
8a1dc4978f
1 changed files with 6 additions and 0 deletions
|
@ -142,6 +142,9 @@ find_config(
|
|||
GstVaapiConfig *config;
|
||||
guint i;
|
||||
|
||||
if (!configs)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < configs->len; i++) {
|
||||
config = &g_array_index(configs, GstVaapiConfig, i);
|
||||
if (config->profile == profile && config->entrypoint == entrypoint)
|
||||
|
@ -158,6 +161,9 @@ get_profile_caps(GArray *configs)
|
|||
GstCaps *out_caps, *caps;
|
||||
guint i;
|
||||
|
||||
if (!configs)
|
||||
return NULL;
|
||||
|
||||
out_caps = gst_caps_new_empty();
|
||||
if (!out_caps)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue