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.
This commit is contained in:
Edward Hervey 2009-07-05 21:29:40 +02:00
parent 04e23f2d6a
commit c3adf88621

View file

@ -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 */