[vlc-commits] commit: audio_intf: fix initial value on increment (fixes #3482) ( Francois Cartegnie )

git at videolan.org git at videolan.org
Wed Mar 31 11:11:40 CEST 2010


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar 30 19:31:14 2010 +0200| [4fe0627faa22938f1753a637cc15fafbc415a078] | committer: Rémi Denis-Courmont 

audio_intf: fix initial value on increment (fixes #3482)

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4fe0627faa22938f1753a637cc15fafbc415a078
---

 src/audio_output/intf.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index d5e0ba7..f7c0f48 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -106,12 +106,14 @@ int doVolumeChanges( unsigned action, vlc_object_t * p_object, int i_nb_steps,
 
     b_var_mute = var_GetBool( p_object, "volume-muted");
 
-    const bool b_unmute_condition = ( /* Also unmute on increments */
+    const bool b_unmute_condition = ( b_var_mute
+                && ( /* Unmute: on increments */
                     ( action == INCREMENT_VOLUME )
                     || /* On explicit unmute */
-                    ( ( action == SET_MUTE ) && ( b_var_mute && !b_mute ) )
+                    ( ( action == SET_MUTE ) && !b_mute )
                     || /* On toggle from muted */
-                    ( ( action == TOGGLE_MUTE ) && b_var_mute ) );
+                    ( action == TOGGLE_MUTE )
+                ));
 
     const bool b_mute_condition = ( !b_var_mute
                     && ( /* explicit */



More information about the vlc-commits mailing list