mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
audiodecoder: Fix reverse playback when there's only one gather set.
The decoder can fail to drain on EOS if there was only one gather set, because it will never have sent the segment event downstream and set the output segment, and fail to detect that the rate < 0.0 Make sure to send pending events before sending all the gather data for decode.
This commit is contained in:
parent
7d4d63be21
commit
7c0f885ad2
1 changed files with 4 additions and 1 deletions
|
@ -1444,6 +1444,9 @@ gst_audio_decoder_drain (GstAudioDecoder * dec)
|
|||
if (dec->priv->drained && !dec->priv->gather)
|
||||
return GST_FLOW_OK;
|
||||
else {
|
||||
/* Send any pending events before draining, as that
|
||||
* may update the pending segment info */
|
||||
send_pending_events (dec);
|
||||
/* dispatch reverse pending buffers */
|
||||
/* chain eventually calls upon drain as well, but by that time
|
||||
* gather list should be clear, so ok ... */
|
||||
|
@ -2052,7 +2055,7 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
|
|||
}
|
||||
|
||||
/* prepare for next segment */
|
||||
/* Use the segment start as a base timstamp
|
||||
/* Use the segment start as a base timestamp
|
||||
* in case upstream does not come up with anything better
|
||||
* (e.g. upstream BYTE) */
|
||||
if (format != GST_FORMAT_TIME) {
|
||||
|
|
Loading…
Reference in a new issue