[MOVED FROM GST-P-FARSIGHT] Empty the queue on flush start

20080514232643-3e2dc-5a3f52a3fd3771164dea95bd14410d76b4fce2aa.gz
This commit is contained in:
Olivier Crete 2008-05-14 23:26:43 +00:00 committed by Edward Hervey
parent c653d0ac38
commit 5f37d95613

View file

@ -437,6 +437,11 @@ gst_live_adder_flush_start (GstLiveAdder * adder)
GST_OBJECT_LOCK (adder);
/* mark ourselves as flushing */
adder->srcresult = GST_FLOW_WRONG_STATE;
/* Empty the queue */
g_queue_foreach (adder->buffers, (GFunc) gst_mini_object_unref, NULL);
while (g_queue_pop_head (adder->buffers)) {}
/* unlock clock, we just unschedule, the entry will be released by the
* locking streaming thread. */
if (adder->clock_id)