+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):
/* 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;
}
/* we can't have EOS anymore now */
basesink->eos = FALSE;
+ /* and signal any waiters now */
+ GST_PREROLL_SIGNAL (pad);
}
/* with STREAM_LOCK */
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) {
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 */
/* 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;
}
/* we can't have EOS anymore now */
basesink->eos = FALSE;
+ /* and signal any waiters now */
+ GST_PREROLL_SIGNAL (pad);
}
/* with STREAM_LOCK */
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) {
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 */