diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2022-08-04 08:14:56 +0200 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2022-08-09 10:30:58 -0700 |
commit | 52aed495cb88f0d7aab8e3ae0652411400c2bd85 (patch) | |
tree | 2c735b394b069c483467da821a1a18c3924e0836 | |
parent | 25fa1b0b45b5508148d2131e0906da320967aee8 (diff) | |
download | mpv-52aed495cb88f0d7aab8e3ae0652411400c2bd85.tar.bz2 mpv-52aed495cb88f0d7aab8e3ae0652411400c2bd85.tar.xz |
audio: drain ao on EOF
This gives pull-based AOs the chance to play all queued audio.
Also it will make sure that the audio has finished playing so we can
reinitialize the AO if format changes are necessary.
Fixes #10018
Fixes #9835
Fixes #8904
-rw-r--r-- | player/audio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c index 06ea1262a6..051a28f85d 100644 --- a/player/audio.c +++ b/player/audio.c @@ -945,6 +945,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx) (opts->gapless_audio && !ao_untimed(ao_c->ao)))) { MP_VERBOSE(mpctx, "audio EOF reached\n"); + ao_drain(mpctx->ao); mpctx->audio_status = STATUS_EOF; mp_wakeup_core(mpctx); } |