diff options
author | wm4 <wm4@nowhere> | 2017-12-01 21:16:59 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-12-01 21:18:06 +0100 |
commit | 076b1d266ea1d432c2ab955a17962f6774506f55 (patch) | |
tree | fcf6108dc193bb6b2089c95415b1dcefc2ac69ac /player/audio.c | |
parent | 2e24f5f1b5a39d00939d55343e3daad72687031b (diff) | |
download | mpv-076b1d266ea1d432c2ab955a17962f6774506f55.tar.bz2 mpv-076b1d266ea1d432c2ab955a17962f6774506f55.tar.xz |
audio: fix missing volume update on init and reinit
This is never updated after the AO inits, so there are several cases
where the volume would stay at 100%, even if it shouldn't. This affects
initial volume as well as track switching or switching between files.
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c index e92d97ffd4..965ac8f71a 100644 --- a/player/audio.c +++ b/player/audio.c @@ -538,6 +538,7 @@ static void reinit_audio_filters_and_output(struct MPContext *mpctx) #endif update_playback_speed(mpctx); + audio_update_volume(mpctx); mp_notify(mpctx, MPV_EVENT_AUDIO_RECONFIG, NULL); @@ -629,6 +630,8 @@ void reinit_audio_chain_src(struct MPContext *mpctx, struct track *track) struct mp_chmap channels; ao_get_format(mpctx->ao, &rate, &format, &channels); mp_audio_buffer_reinit_fmt(ao_c->ao_buffer, format, &channels, rate); + + audio_update_volume(mpctx); } mp_wakeup_core(mpctx); |