From 0d9b6389319f01fe51dfabf073567b6a7c341bab Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 25 May 2006 16:50:17 +0000 Subject: [PATCH] gst/playback/gstdecodebin.c: When there is only one unfinished pad and it receives an event that doesn't match our re... Original commit message from CVS: * gst/playback/gstdecodebin.c: (remove_fakesink), (pad_probe): When there is only one unfinished pad and it receives an event that doesn't match our requirements, we need to set alldone=FALSE so that the fakesink is not removed yet. --- ChangeLog | 7 +++++++ gst/playback/gstdecodebin.c | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8ea27e42b1..b5dd82048c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-05-25 Jan Schmidt + + * gst/playback/gstdecodebin.c: (remove_fakesink), (pad_probe): + When there is only one unfinished pad and it receives an event that + doesn't match our requirements, we need to set alldone=FALSE so that + the fakesink is not removed yet. + 2006-05-25 Tim-Philipp Müller * ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind): diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index c9198d7201..1ce8c318aa 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -495,6 +495,7 @@ static void remove_fakesink (GstDecodeBin * decode_bin) { if (decode_bin->fakesink) { + GST_DEBUG_OBJECT (decode_bin, "Removing fakesink and marking state dirty"); gst_object_ref (decode_bin->fakesink); gst_bin_remove (GST_BIN (decode_bin), decode_bin->fakesink); @@ -534,8 +535,13 @@ pad_probe (GstPad * pad, GstMiniObject * data, GstDecodeBin * decode_bin) decode_bin->numwaiting--; pdata->done = TRUE; } - } else if (!(pdata->done)) + } + + if (!(pdata->done)) { + GST_LOG_OBJECT (decode_bin, "Pad probe on pad %" GST_PTR_FORMAT + " but pad %" GST_PTR_FORMAT " still needs data.", pad, pdata->pad); alldone = FALSE; + } } if (alldone) remove_fakesink (decode_bin);