summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-30 17:17:04 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-03-30 17:17:04 +0100
commit3475d4f457fa6908531a98f2a29fd5762715bb5a (patch)
treedb1bc36b9a65161846483bd93955cdc6d070df28
parent7f78f7f9e387759c362388a991094da6b6ba715e (diff)
decodebin: Remove GstdecodePads that are not going to be exposed
This makes sure that they're unlnked and don't cause any errors or block the pipeline.
-rw-r--r--gst/playback/gstdecodebin2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index 984a296f0..ab4b34f1d 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -1740,6 +1740,7 @@ discarded_type:
GST_LOG_OBJECT (pad, "Known type, but discarded because not final caps");
chain->deadend = TRUE;
chain->endcaps = gst_caps_ref (caps);
+ gst_object_replace ((GstObject **) & chain->current_pad, NULL);
/* Try to expose anything */
EXPOSE_LOCK (dbin);
@@ -1758,6 +1759,7 @@ unknown_type:
chain->deadend = TRUE;
chain->endcaps = gst_caps_ref (caps);
+ gst_object_replace ((GstObject **) & chain->current_pad, NULL);
gst_element_post_message (GST_ELEMENT_CAST (dbin),
gst_missing_decoder_message_new (GST_ELEMENT_CAST (dbin), caps));
@@ -2491,6 +2493,7 @@ pad_event_cb (GstPad * pad, GstPadProbeInfo * info, gpointer data)
GST_DEBUG_OBJECT (dbin, "Received EOS on a non final pad, this stream "
"ended too early");
chain->deadend = TRUE;
+ gst_object_replace ((GstObject **) & chain->current_pad, NULL);
/* we don't set the endcaps because NULL endcaps means early EOS */
EXPOSE_LOCK (dbin);
if (gst_decode_chain_is_complete (dbin->decode_chain))