mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
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
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
* because it's being disposed. */
|
||||
selector = GST_ELEMENT_CAST (gst_pad_get_parent (peer));
|
||||
if (!selector)
|
||||
if (!selector) {
|
||||
gst_object_unref (peer);
|
||||
goto no_selector;
|
||||
}
|
||||
|
||||
/* release the pad to the selector, this will make the selector choose a new
|
||||
* pad. */
|
||||
|
|
Loading…
Reference in a new issue