mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
decklink: don't crash if there are no decklink devices
Fixes generic/states check.
This commit is contained in:
parent
9bb905620c
commit
2a40ab6ad6
1 changed files with 12 additions and 0 deletions
|
@ -1286,6 +1286,9 @@ gst_decklink_acquire_nth_output (gint n, GstElement * sink, gboolean is_audio)
|
|||
|
||||
g_once (&devices_once, init_devices, NULL);
|
||||
|
||||
if (devices == NULL)
|
||||
return NULL;
|
||||
|
||||
if (n < 0 || (guint) n >= devices->len)
|
||||
return NULL;
|
||||
|
||||
|
@ -1318,6 +1321,9 @@ gst_decklink_release_nth_output (gint n, GstElement * sink, gboolean is_audio)
|
|||
GstDecklinkOutput *output;
|
||||
Device *device;
|
||||
|
||||
if (devices == NULL)
|
||||
return;
|
||||
|
||||
if (n < 0 || (guint) n >= devices->len)
|
||||
return;
|
||||
|
||||
|
@ -1346,6 +1352,9 @@ gst_decklink_acquire_nth_input (gint n, GstElement * src, gboolean is_audio)
|
|||
|
||||
g_once (&devices_once, init_devices, NULL);
|
||||
|
||||
if (devices == NULL)
|
||||
return NULL;
|
||||
|
||||
if (n < 0 || (guint) n >= devices->len)
|
||||
return NULL;
|
||||
|
||||
|
@ -1380,6 +1389,9 @@ gst_decklink_release_nth_input (gint n, GstElement * src, gboolean is_audio)
|
|||
GstDecklinkInput *input;
|
||||
Device *device;
|
||||
|
||||
if (devices == NULL)
|
||||
return;
|
||||
|
||||
if (n < 0 || (guint) n >= devices->len)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue