summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2022-08-04 08:14:56 +0200
committerPhilip Langdale <github.philipl@overt.org>2022-08-09 10:30:58 -0700
commit52aed495cb88f0d7aab8e3ae0652411400c2bd85 (patch)
tree2c735b394b069c483467da821a1a18c3924e0836 /player
parent25fa1b0b45b5508148d2131e0906da320967aee8 (diff)
downloadmpv-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
Diffstat (limited to 'player')
-rw-r--r--player/audio.c1
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);
}