From c3adf8862135050fd410a85000b0634e8e06f893 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 5 Jul 2009 21:29:40 +0200 Subject: [PATCH] adder: Call set_flushing(TRUE) for flushing seeks *when* the streaming is stopped. This ensures that collectpads' cookie is properly updated so that when the streaming threads will restart and be checking for the flushing status of all pads there will be no inconsistent state. --- gst/adder/gstadder.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 5f93f53102..87e2d79ba7 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -693,8 +693,12 @@ gst_adder_src_event (GstPad * pad, GstEvent * event) else adder->segment_position = 0; /* we flushed out the downstream segment, make sure we push a new one */ - if (flush) + if (flush) { adder->segment_pending = TRUE; + /* Yes, we need to call _set_flushing again *WHEN* the streaming threads + * have stopped so that the cookie gets properly updated. */ + gst_collect_pads_set_flushing (adder->collect, TRUE); + } /* we might have a pending flush_stop event now. This event will either be * sent by an upstream element when it completes the seek or we will push * one in the collected callback ourself */