From 5028a513dd5403f7c0e4e2e7ca4c46c1ce79a5cc Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 4 Jan 2007 16:30:06 +0000 Subject: [PATCH] restore volume if muted at exit git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21820 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mplayer.c b/mplayer.c index 517ac64f04..e672f95743 100644 --- a/mplayer.c +++ b/mplayer.c @@ -593,6 +593,11 @@ char *get_metadata (metadata_t type) { return meta; } +#include "mixer.h" +mixer_t mixer; +/// step size of mixer changes +int volstep = 3; + static void uninit_player(unsigned int mask){ mask=inited_flags&mask; @@ -669,6 +674,7 @@ static void uninit_player(unsigned int mask){ if(mask&INITED_AO){ inited_flags&=~INITED_AO; current_module="uninit_ao"; + if (user_muted | edl_muted) mixer_mute(&mixer); audio_out->uninit(eof?0:1); audio_out=NULL; } @@ -815,11 +821,6 @@ static void exit_sighandler(int x){ extern void mp_input_register_options(m_config_t* cfg); -#include "mixer.h" -mixer_t mixer; -/// step size of mixer changes -int volstep = 3; - #include "cfg-mplayer.h" static void parse_cfgfiles( m_config_t* conf )