Unref selector request pad even if we no longer have a selector.
During destruction, we won't have a selector any more, but we still need to unref the pad to avoid leaking it.
This commit is contained in:
parent
c799f3f77f
commit
61e81ada2c
@ -1835,8 +1835,10 @@ pad_removed_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
|
|||||||
/* get selector, this can be NULL when the element is removing the pads
|
/* get selector, this can be NULL when the element is removing the pads
|
||||||
* because it's being disposed. */
|
* because it's being disposed. */
|
||||||
selector = GST_ELEMENT_CAST (gst_pad_get_parent (peer));
|
selector = GST_ELEMENT_CAST (gst_pad_get_parent (peer));
|
||||||
if (!selector)
|
if (!selector) {
|
||||||
|
gst_object_unref (peer);
|
||||||
goto no_selector;
|
goto no_selector;
|
||||||
|
}
|
||||||
|
|
||||||
/* release the pad to the selector, this will make the selector choose a new
|
/* release the pad to the selector, this will make the selector choose a new
|
||||||
* pad. */
|
* pad. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user