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.
This commit is contained in:
Sebastian Dröge 2010-02-15 01:18:55 +01:00
parent 93d7bd2c43
commit b37de8a63b

View file

@ -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);