mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 21:06:00 +00:00
audio: fix EOF state with --keep-open
In paused mode, we never entered the audio EOF state. This shows e.g. in
--keep-open mode, which will not set the eof-reached property correctly.
Regression since commit c06cd1b9
. This commit was the wrong fix. We need
to respect the buffer state, and pausing has nothing to do with this.
Fixes #2167.
This commit is contained in:
parent
3cbf68b470
commit
c581804603
@ -609,7 +609,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
|
||||
mp_audio_buffer_skip(mpctx->ao_buffer, played);
|
||||
|
||||
mpctx->audio_status = STATUS_PLAYING;
|
||||
if (audio_eof && !mpctx->paused) {
|
||||
if (audio_eof && !mp_audio_buffer_samples(mpctx->ao_buffer)) {
|
||||
mpctx->audio_status = STATUS_DRAINING;
|
||||
// Wait until the AO has played all queued data. In the gapless case,
|
||||
// we trigger EOF immediately, and let it play asynchronously.
|
||||
|
Loading…
Reference in New Issue
Block a user