diff --git a/ChangeLog b/ChangeLog index c5e9d770df..645c1837ab 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 081ca45e32..3c4b5f4408 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 081ca45e32..3c4b5f4408 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 */