mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +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;
|
GstVaapiConfig *config;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
if (!configs)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
for (i = 0; i < configs->len; i++) {
|
for (i = 0; i < configs->len; i++) {
|
||||||
config = &g_array_index(configs, GstVaapiConfig, i);
|
config = &g_array_index(configs, GstVaapiConfig, i);
|
||||||
if (config->profile == profile && config->entrypoint == entrypoint)
|
if (config->profile == profile && config->entrypoint == entrypoint)
|
||||||
|
@ -158,6 +161,9 @@ get_profile_caps(GArray *configs)
|
||||||
GstCaps *out_caps, *caps;
|
GstCaps *out_caps, *caps;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
if (!configs)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
out_caps = gst_caps_new_empty();
|
out_caps = gst_caps_new_empty();
|
||||||
if (!out_caps)
|
if (!out_caps)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue