From 5fee17ac8f2cd951451ee08ad3f48470812d7393 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 9 Mar 2012 14:15:44 +0100 Subject: [PATCH] uridecodebin: restore FLOATING flag when reusing decodebin instance ... which avoids leaking these due to an extra ref later on. --- gst/playback/gsturidecodebin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index 9fe1691639..30f80289a6 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -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);