summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-02-15 01:18:55 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-02-15 01:21:14 +0100
commitb37de8a63bee36fa14dca45ed65cd07ac698c829 (patch)
tree66fc2f038685e60770262a8aa4ba35dc153d2256
parent93d7bd2c433df62c58b47927c938670149e708f4 (diff)
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.
-rw-r--r--gst/playback/gstdecodebin2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index ade6a24e..a518d6d9 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);