]> git.sesse.net Git - vlc/commitdiff
Ignore unmute if volume hasn't been set or muted. fixes #3636
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 8 Jun 2010 23:13:56 +0000 (01:13 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 9 Jun 2010 21:12:26 +0000 (23:12 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/audio_output/intf.c

index f7c0f489e616c4645ae6f6a6500af981c656cf4e..493ad5c71bb22c768390ecac596b70adc92d0f99 100644 (file)
@@ -122,6 +122,17 @@ int doVolumeChanges( unsigned action, vlc_object_t * p_object, int i_nb_steps,
                         ( action == TOGGLE_MUTE )
                     ));
 
+    /* If muting or unmuting when play hasn't started */
+    if ( action == SET_MUTE && !b_unmute_condition && !b_mute_condition )
+    {
+        if ( p_aout )
+        {
+            aout_unlock_volume( p_aout );
+            vlc_object_release( p_aout );
+        }
+        return i_result;
+    }
+
     /* On UnMute */
     if ( b_unmute_condition )
     {