From: Tim-Philipp Müller Date: Wed, 7 Sep 2011 11:32:01 +0000 (+0100) Subject: decodebin2: fix element factory refcounting X-Git-Tag: 1.19.3~511^2~6555^2~510 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f93748fbd496953409b8e0815ac6a27b2ad5367c;p=platform%2Fupstream%2Fgstreamer.git decodebin2: fix element factory refcounting g_value_get_object() does not give us our own ref. Fixes "Trying to dispose object "flacparse", but it still has a parent "registry0". You need to let the parent manage the object instead of unreffing the object directly." and similar warnings. https://bugzilla.gnome.org/show_bug.cgi?id=658416 --- diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 2312230..322ae28 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1802,10 +1802,8 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, } templs = g_list_next (templs); } - if (skip) { - gst_object_unref (factory); + if (skip) continue; - } } /* If the factory is for a parser we first check if the factory