mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
streamselector: Return a NULL iterator instead of an empty iterator that returns NULL if there's no otherpad
This commit is contained in:
parent
b015e5e763
commit
03f7820d2c
1 changed files with 7 additions and 7 deletions
|
@ -635,16 +635,16 @@ gst_stream_selector_pad_iterate_linked_pads (GstPad * pad)
|
||||||
GstStreamSelector *sel = GST_STREAM_SELECTOR (gst_pad_get_parent (pad));
|
GstStreamSelector *sel = GST_STREAM_SELECTOR (gst_pad_get_parent (pad));
|
||||||
GValue value = { 0, };
|
GValue value = { 0, };
|
||||||
GstPad *otherpad;
|
GstPad *otherpad;
|
||||||
GstIterator *ret;
|
GstIterator *ret = NULL;
|
||||||
|
|
||||||
otherpad = gst_stream_selector_get_linked_pad (pad, TRUE);
|
otherpad = gst_stream_selector_get_linked_pad (pad, TRUE);
|
||||||
g_value_init (&value, GST_TYPE_PAD);
|
if (otherpad) {
|
||||||
g_value_set_object (&value, otherpad);
|
g_value_init (&value, GST_TYPE_PAD);
|
||||||
ret = gst_iterator_new_single (GST_TYPE_PAD, &value);
|
g_value_set_object (&value, otherpad);
|
||||||
g_value_unset (&value);
|
ret = gst_iterator_new_single (GST_TYPE_PAD, &value);
|
||||||
|
g_value_unset (&value);
|
||||||
if (otherpad)
|
|
||||||
gst_object_unref (otherpad);
|
gst_object_unref (otherpad);
|
||||||
|
}
|
||||||
gst_object_unref (sel);
|
gst_object_unref (sel);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue