]> git.sesse.net Git - vlc/commitdiff
libvlc: fix volume on sound increment when muted
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 12 Jan 2010 21:48:16 +0000 (22:48 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 12 Jan 2010 22:24:07 +0000 (23:24 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/audio_output/intf.c

index 0424b888fba434088377e49c2ca43b67cc6fd722..db55c4ade4d33a0d27866185bf5ac5865107fdcd 100644 (file)
@@ -118,8 +118,9 @@ int doVolumeChanges( unsigned action, vlc_object_t * p_object, int i_nb_steps,
     {
         i_volume_step = config_GetInt( p_object->p_libvlc, "volume-step" );
 
-        i_volume = config_GetInt( p_object, "volume" )
-                   + i_volume_step * i_nb_steps;
+        if ( !b_unmute_condition )
+            i_volume = config_GetInt( p_object, "volume" );
+        i_volume += i_volume_step * i_nb_steps;
 
         if ( i_volume > AOUT_VOLUME_MAX )
             i_volume = AOUT_VOLUME_MAX;