From 52aed495cb88f0d7aab8e3ae0652411400c2bd85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Thu, 4 Aug 2022 08:14:56 +0200 Subject: 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 --- player/audio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'player') 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); } -- cgit v1.2.3