summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-01-07 14:10:05 +0100
committerwm4 <wm4@mplayer2.org>2012-01-18 04:21:45 +0100
commitaae97b7e254f312e5c7bfbe940cb8515a25bf11d (patch)
tree0444ae3fe25edef952757d2d6b2b79a560209cd9 /command.c
parent15a318b2a56766e7bc2dee5d4cc8f514ba21fe39 (diff)
downloadmpv-aae97b7e254f312e5c7bfbe940cb8515a25bf11d.tar.bz2
mpv-aae97b7e254f312e5c7bfbe940cb8515a25bf11d.tar.xz
audio: properly restore audio volume on exit when mute is used
When you mute audio, mplayer is supposed to restore the volume controls on exit. This affects when --softvol isn't used and the audio output driver volume controls directly affect the system wide volume controls. This wasn't done in some cases.
Diffstat (limited to 'command.c')
-rw-r--r--command.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/command.c b/command.c
index be1d688f8f..aee38463fd 100644
--- a/command.c
+++ b/command.c
@@ -762,8 +762,7 @@ static int mp_property_mute(m_option_t *prop, int action, void *arg,
return M_PROPERTY_DISABLED;
if (!arg)
return M_PROPERTY_ERROR;
- if ((!!*(int *) arg) != mpctx->mixer.muted)
- mixer_mute(&mpctx->mixer);
+ mixer_setmuted(&mpctx->mixer, *(int *) arg);
mpctx->user_muted = mpctx->mixer.muted;
return M_PROPERTY_OK;
case M_PROPERTY_STEP_UP: