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
This commit is contained in:
Tim-Philipp Müller 2011-09-07 12:32:01 +01:00
parent cea0ac790f
commit f93748fbd4

View 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