From efd9da3dd099b766d80bb08d9b07adc6ac0f7b6d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 26 Jan 2006 13:09:24 +0000 Subject: [PATCH] gst/playback/gstdecodebin.c: Also consider the flush-start and tag events as unblockers for the pad probes. Original commit message from CVS: * gst/playback/gstdecodebin.c: (pad_probe): Also consider the flush-start and tag events as unblockers for the pad probes. --- ChangeLog | 6 ++++++ gst/playback/gstdecodebin.c | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14261ce6b6..40c887ab6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-26 Edward Hervey + + * gst/playback/gstdecodebin.c: (pad_probe): + Also consider the flush-start and tag events as unblockers + for the pad probes. + 2006-01-26 Julien MOUTTE * gst/playback/gstplaybin.c: (gst_play_bin_init), diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 5329a61695..fa53df5b64 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -521,10 +521,18 @@ pad_probe (GstPad * pad, GstMiniObject * data, GstDecodeBin * decode_bin) PadProbeData *pdata = (PadProbeData *) tmp->data; if (pdata->pad == pad) { - if (GST_IS_BUFFER (data)) + if (GST_IS_BUFFER (data)) { + if (!pdata->done) + decode_bin->numwaiting--; pdata->done = TRUE; - else if (GST_IS_EVENT (data) && (GST_EVENT_TYPE (data) == GST_EVENT_EOS)) + } else if (GST_IS_EVENT (data) && + ((GST_EVENT_TYPE (data) == GST_EVENT_EOS) || + (GST_EVENT_TYPE (data) == GST_EVENT_TAG) || + (GST_EVENT_TYPE (data) == GST_EVENT_FLUSH_START))) { + if (!pdata->done) + decode_bin->numwaiting--; pdata->done = TRUE; + } } else if (!(pdata->done)) alldone = FALSE; }