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:
Michael Smith 2009-01-30 17:47:07 -08:00
parent c799f3f77f
commit 61e81ada2c

View file

@ -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. */