mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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:
parent
22cdc527a5
commit
45084bf579
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue