summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2011-12-28 00:06:23 +0100
committerwm4 <wm4@mplayer2.org>2012-01-18 04:21:45 +0100
commit95c52f865da2459f47ed708c41324f0cc5386da3 (patch)
tree43e304cb1afecd3036d3d07a111e56517ef339f7
parentd1b38a8a371d13ce59b2d1b4152f0252ac8d8b4c (diff)
downloadmpv-95c52f865da2459f47ed708c41324f0cc5386da3.tar.bz2
mpv-95c52f865da2459f47ed708c41324f0cc5386da3.tar.xz
softvol: make sure softvol settings are restored when switching audio tracks
At least in the case when switching to no audio track and then switching back, the volume settings were not restored with --softvol. Fix this by moving the call restoring the settings to a better place.
-rw-r--r--mplayer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 8f635576c3..52889c7d58 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1449,7 +1449,6 @@ static int build_afilter_chain(struct MPContext *mpctx)
result = init_audio_filters(sh_audio, new_srate,
&ao->samplerate, &ao->channels, &ao->format);
mpctx->mixer.afilter = sh_audio->afilter;
- mixer_reinit(&mpctx->mixer);
return result;
}
@@ -1854,6 +1853,7 @@ void reinit_audio_chain(struct MPContext *mpctx)
}
mpctx->mixer.ao = ao;
mpctx->mixer.volstep = volstep;
+ mixer_reinit(&mpctx->mixer);
mpctx->syncing_audio = true;
return;