[vlc-commits] commit: Ignore unmute if volume hasn't been set or muted. fixes #3636 ( Francois Cartegnie )

git at videolan.org git at videolan.org
Wed Jun 9 23:23:49 CEST 2010


vlc/vlc-1.1 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jun  9 01:13:56 2010 +0200| [b57a7089fc1b3b024b899e438283ace0af351c96] | committer: Jean-Baptiste Kempf 

Ignore unmute if volume hasn't been set or muted. fixes #3636

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 3a6ce9618b93435f8e8e2b0b3c9310e9752c870f)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/audio_output/intf.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index f7c0f48..493ad5c 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -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 )
     {



More information about the vlc-commits mailing list