From: Edward Hervey Date: Wed, 15 Sep 2010 12:15:13 +0000 (+0200) Subject: decodebin2: Actually dispose the unused ghostpads X-Git-Tag: RELEASE-0.10.31~200 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75b522dacfd0b3d1f0300bb0b751ffb424f9e793;p=platform%2Fupstream%2Fgst-plugins-base.git decodebin2: Actually dispose the unused ghostpads --- diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 60285e2..4553294 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1403,6 +1403,7 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, /* If the caps are raw, this just means we don't want to expose them */ if (gst_caps_can_intersect (raw, caps)) { gst_caps_unref (raw); + gst_object_unref (dpad); goto discarded_type; } gst_caps_unref (raw); @@ -1462,8 +1463,10 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, } gst_caps_unref (rawcaps); - if (dontuse) + if (dontuse) { + gst_object_unref (dpad); goto discarded_type; + } } /* 1.f else continue autoplugging something from the list. */