From 7df9f81d2208c072379a918df2002631d49fe511 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 9 Apr 2020 11:45:46 +0200 Subject: player: do not deinitialize AO on track switching This should make it behave roughly like when switching from a file to the next (clearing audio buffers, keeping AO, but closing AO if the audio format seems to have changed and gapless mode is "weak"). Not necessarily useful, but harmless and may help with #7579 (untested). --- player/loadfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/player/loadfile.c b/player/loadfile.c index 6af9ac37fd..2490cfa996 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -632,7 +632,8 @@ void mp_switch_track_n(struct MPContext *mpctx, int order, enum stream_type type } else if (type == STREAM_AUDIO) { clear_audio_output_buffers(mpctx); uninit_audio_chain(mpctx); - uninit_audio_out(mpctx); + if (!track) + uninit_audio_out(mpctx); } } if (type == STREAM_SUB) -- cgit v1.2.3