From 61e81ada2c9eb5d4bfb12e4e2997be790650ced3 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 30 Jan 2009 17:47:07 -0800 Subject: [PATCH] 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. --- gst/playback/gstplaybin2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 1e1f31a713..9189e21194 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -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. */