gst/base/gstbasesink.c: Flushing the preroll queue always needs to unlock the waiters.
authorWim Taymans <wim.taymans@gmail.com>
Tue, 28 Jun 2005 11:02:18 +0000 (11:02 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 28 Jun 2005 11:02:18 +0000 (11:02 +0000)
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
gst/base/gstbasesink.c
libs/gst/base/gstbasesink.c

index c5e9d77..645c183 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-28  Wim Taymans  <wim@fluendo.com>
+
+       * 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  <edward@fluendo.com>
 
        * gst/gstpipeline.c: (gst_pipeline_send_event): 
index 081ca45..3c4b5f4 100644 (file)
@@ -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 */
index 081ca45..3c4b5f4 100644 (file)
@@ -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 */