adder: send flush-stop earlier

When no flush-stop has been sent by upstream, we have to send one ourselves to
continue playback. Do this as soon as the collect function is called instead of
after we possibly pushed segment events (that got then flushed out)
This commit is contained in:
Wim Taymans 2009-06-12 16:31:00 +02:00
parent 22cdc527a5
commit 45084bf579

View file

@ -906,6 +906,11 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
if (G_UNLIKELY (adder->func == NULL))
goto not_negotiated;
if (adder->flush_stop_pending) {
gst_pad_push_event (adder->srcpad, gst_event_new_flush_stop ());
adder->flush_stop_pending = FALSE;
}
/* get available bytes for reading, this can be 0 which could mean empty
* buffers or EOS, which we will catch when we loop over the pads. */
outsize = gst_collect_pads_available (pads);
@ -1016,10 +1021,6 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
adder->timestamp, adder->segment_position);
}
}
if (adder->flush_stop_pending) {
gst_pad_push_event (adder->srcpad, gst_event_new_flush_stop ());
adder->flush_stop_pending = FALSE;
}
/* set timestamps on the output buffer */
GST_BUFFER_TIMESTAMP (outbuf) = adder->timestamp;