mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
inputselector: avoid iterating over a single NULL pad
This commit is contained in:
parent
3dbcb73b11
commit
7a0e401133
1 changed files with 7 additions and 7 deletions
|
@ -334,7 +334,7 @@ gst_selector_pad_iterate_linked_pads (GstPad * pad)
|
||||||
{
|
{
|
||||||
GstInputSelector *sel;
|
GstInputSelector *sel;
|
||||||
GstPad *otherpad;
|
GstPad *otherpad;
|
||||||
GstIterator *it;
|
GstIterator *it = NULL;
|
||||||
GValue val = { 0, };
|
GValue val = { 0, };
|
||||||
|
|
||||||
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
|
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
|
||||||
|
@ -342,13 +342,13 @@ gst_selector_pad_iterate_linked_pads (GstPad * pad)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
otherpad = gst_input_selector_get_linked_pad (sel, pad, TRUE);
|
otherpad = gst_input_selector_get_linked_pad (sel, pad, TRUE);
|
||||||
g_value_init (&val, GST_TYPE_PAD);
|
if (otherpad) {
|
||||||
g_value_set_object (&val, otherpad);
|
g_value_init (&val, GST_TYPE_PAD);
|
||||||
it = gst_iterator_new_single (GST_TYPE_PAD, &val);
|
g_value_set_object (&val, otherpad);
|
||||||
g_value_unset (&val);
|
it = gst_iterator_new_single (GST_TYPE_PAD, &val);
|
||||||
|
g_value_unset (&val);
|
||||||
if (otherpad)
|
|
||||||
gst_object_unref (otherpad);
|
gst_object_unref (otherpad);
|
||||||
|
}
|
||||||
gst_object_unref (sel);
|
gst_object_unref (sel);
|
||||||
|
|
||||||
return it;
|
return it;
|
||||||
|
|
Loading…
Reference in a new issue