decodebin2: fix element factory refcounting
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 7 Sep 2011 11:32:01 +0000 (12:32 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 7 Sep 2011 11:34:06 +0000 (12:34 +0100)
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

gst/playback/gstdecodebin2.c

index 2312230..322ae28 100644 (file)
@@ -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