From 7dc174d140b421015db22a43d009dfcf3e095a4e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 28 Jun 2005 11:02:18 +0000 Subject: [PATCH] gst/base/gstbasesink.c: Flushing the preroll queue always needs to unlock the waiters. Original commit message from CVS: * gst/base/gstbasesink.c: (gst_basesink_preroll_queue_flush), (gst_basesink_event), (gst_basesink_deactivate): Flushing the preroll queue always needs to unlock the waiters. --- ChangeLog | 6 ++++++ gst/base/gstbasesink.c | 10 +++++----- libs/gst/base/gstbasesink.c | 10 +++++----- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5e9d77..645c183 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-06-28 Wim Taymans + + * gst/base/gstbasesink.c: (gst_basesink_preroll_queue_flush), + (gst_basesink_event), (gst_basesink_deactivate): + Flushing the preroll queue always needs to unlock the waiters. + 2005-06-28 Edward Hervey * gst/gstpipeline.c: (gst_pipeline_send_event): diff --git a/gst/base/gstbasesink.c b/gst/base/gstbasesink.c index 081ca45..3c4b5f4 100644 --- a/gst/base/gstbasesink.c +++ b/gst/base/gstbasesink.c @@ -408,7 +408,7 @@ gst_basesink_preroll_queue_empty (GstBaseSink * basesink, GstPad * pad) /* with PREROLL_LOCK */ static void -gst_basesink_preroll_queue_flush (GstBaseSink * basesink) +gst_basesink_preroll_queue_flush (GstBaseSink * basesink, GstPad * pad) { GstMiniObject *obj; GQueue *q = basesink->preroll_queue; @@ -422,6 +422,8 @@ gst_basesink_preroll_queue_flush (GstBaseSink * basesink) } /* we can't have EOS anymore now */ basesink->eos = FALSE; + /* and signal any waiters now */ + GST_PREROLL_SIGNAL (pad); } /* with STREAM_LOCK */ @@ -587,9 +589,8 @@ gst_basesink_event (GstPad * pad, GstEvent * event) GST_PREROLL_LOCK (pad); /* we need preroll after the flush */ basesink->need_preroll = TRUE; - gst_basesink_preroll_queue_flush (basesink); /* unlock from a possible state change/preroll */ - GST_PREROLL_SIGNAL (pad); + gst_basesink_preroll_queue_flush (basesink, pad); GST_LOCK (basesink); if (basesink->clock_id) { @@ -847,9 +848,8 @@ gst_basesink_deactivate (GstBaseSink * basesink, GstPad * pad) bclass->unlock (basesink); /* flush out the data thread if it's locked in finish_preroll */ - gst_basesink_preroll_queue_flush (basesink); basesink->need_preroll = FALSE; - GST_PREROLL_SIGNAL (pad); + gst_basesink_preroll_queue_flush (basesink, pad); GST_PREROLL_UNLOCK (pad); /* step 2, make sure streaming finishes */ diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 081ca45..3c4b5f4 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -408,7 +408,7 @@ gst_basesink_preroll_queue_empty (GstBaseSink * basesink, GstPad * pad) /* with PREROLL_LOCK */ static void -gst_basesink_preroll_queue_flush (GstBaseSink * basesink) +gst_basesink_preroll_queue_flush (GstBaseSink * basesink, GstPad * pad) { GstMiniObject *obj; GQueue *q = basesink->preroll_queue; @@ -422,6 +422,8 @@ gst_basesink_preroll_queue_flush (GstBaseSink * basesink) } /* we can't have EOS anymore now */ basesink->eos = FALSE; + /* and signal any waiters now */ + GST_PREROLL_SIGNAL (pad); } /* with STREAM_LOCK */ @@ -587,9 +589,8 @@ gst_basesink_event (GstPad * pad, GstEvent * event) GST_PREROLL_LOCK (pad); /* we need preroll after the flush */ basesink->need_preroll = TRUE; - gst_basesink_preroll_queue_flush (basesink); /* unlock from a possible state change/preroll */ - GST_PREROLL_SIGNAL (pad); + gst_basesink_preroll_queue_flush (basesink, pad); GST_LOCK (basesink); if (basesink->clock_id) { @@ -847,9 +848,8 @@ gst_basesink_deactivate (GstBaseSink * basesink, GstPad * pad) bclass->unlock (basesink); /* flush out the data thread if it's locked in finish_preroll */ - gst_basesink_preroll_queue_flush (basesink); basesink->need_preroll = FALSE; - GST_PREROLL_SIGNAL (pad); + gst_basesink_preroll_queue_flush (basesink, pad); GST_PREROLL_UNLOCK (pad); /* step 2, make sure streaming finishes */ -- 2.7.4