diff options
author | wm4 <wm4@nowhere> | 2020-04-09 11:45:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-04-09 11:45:46 +0200 |
commit | 7df9f81d2208c072379a918df2002631d49fe511 (patch) | |
tree | af4515b9af932b5c9f11b9f9b99feafab816e75c | |
parent | bc1a18ee245ec2243d4b7b0fa22894f4326b3758 (diff) | |
download | mpv-7df9f81d2208c072379a918df2002631d49fe511.tar.bz2 mpv-7df9f81d2208c072379a918df2002631d49fe511.tar.xz |
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).
-rw-r--r-- | player/loadfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |