uridecodebin: restore FLOATING flag when reusing decodebin instance

... which avoids leaking these due to an extra ref later on.
This commit is contained in:
Mark Nauwelaerts 2012-03-09 14:15:44 +01:00
parent 7ff608889a
commit 5fee17ac8f

View file

@ -1513,6 +1513,8 @@ remove_decoders (GstURIDecodeBin * bin, gboolean force)
caps = DEFAULT_CAPS;
g_object_set (decoder, "caps", caps, NULL);
gst_caps_unref (caps);
/* make it freshly floating again */
GST_OBJECT_FLAG_SET (decoder, GST_OBJECT_FLOATING);
bin->pending_decodebins =
g_slist_prepend (bin->pending_decodebins, decoder);