summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-04-12 16:35:48 -0500
committerDudemanguy <random342@airmail.cc>2021-04-18 15:47:48 +0000
commit3239e41277173bace5ecc2a22910c4660642429c (patch)
tree92d3662a83896e18ee6255498fcfb0ac325f104a /player
parentcd7a7a1de8d8bffa05170befef25b251711c994a (diff)
downloadmpv-3239e41277173bace5ecc2a22910c4660642429c.tar.bz2
mpv-3239e41277173bace5ecc2a22910c4660642429c.tar.xz
audio: set audio chain ao on reinit
Seems to be a slight corner case with the audio API rewrite. When switching from one file to another one, the volume of the ao would never be set because the audio chain's ao wasn't set. This caused a bug with the reset-set-on-file option. The volume/property would be correctly set internally, but the gain was not actually set when the file switched. Fixes #8287.
Diffstat (limited to 'player')
-rw-r--r--player/audio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c
index bf35bfb02a..86fd233a6a 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -568,8 +568,10 @@ void reinit_audio_chain_src(struct MPContext *mpctx, struct track *track)
if (recreate_audio_filters(mpctx) < 0)
goto init_error;
- if (mpctx->ao)
+ if (mpctx->ao) {
+ ao_chain_set_ao(ao_c, mpctx->ao);
audio_update_volume(mpctx);
+ }
mp_wakeup_core(mpctx);
return;