From e2e8c21be4fdf826d91a141e181d9a3ddf65c6c6 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Tue, 23 Aug 2022 10:17:46 -0700 Subject: player/audio: remove explicit drain on EOF We have previously had a problem where pull AOs (such as pipewire) would not reinitialize on a format change when going between two audio-only files. In such a situation, playback would stop after the first file. We initially attempted to fix this by explicitly draining on EOF, which solves that problem but introduces a blocking step where we don't actually want one, breaking gapless audio, and causing dropped frames at the end of playback for files with video in them too. So, let's undo these changes and do something better in the next commit. --- player/audio.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'player') diff --git a/player/audio.c b/player/audio.c index 92408ebf99..06ea1262a6 100644 --- a/player/audio.c +++ b/player/audio.c @@ -945,8 +945,6 @@ void fill_audio_out_buffers(struct MPContext *mpctx) (opts->gapless_audio && !ao_untimed(ao_c->ao)))) { MP_VERBOSE(mpctx, "audio EOF reached\n"); - if (mpctx->ao) - ao_drain(mpctx->ao); mpctx->audio_status = STATUS_EOF; mp_wakeup_core(mpctx); } -- cgit v1.2.3