From b37de8a63bee36fa14dca45ed65cd07ac698c829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 15 Feb 2010 01:18:55 +0100 Subject: [PATCH] decodebin2: Set ghostpad targets to NULL when freeing a decode chain Otherwise the ghostpad will still be linked to the peer and there will still be a reference kept, leading to nothing being unlinked and destroyed until decodebin2 is finalized. This fixes reuse of decodebin2 if a raw stream is connected to its sinkpad. --- gst/playback/gstdecodebin2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index ade6a24e3d..a518d6d9af 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -2175,6 +2175,7 @@ gst_decode_chain_free_internal (GstDecodeChain * chain, gboolean hide) gst_element_remove_pad (GST_ELEMENT_CAST (chain->dbin), GST_PAD_CAST (chain->endpad)); + gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (chain->endpad), NULL); chain->endpad->exposed = FALSE; if (!hide) { gst_object_unref (chain->endpad);