[vlc-devel] [PATCH] Ignore unmute if volume hasn't been set or muted. fixes #3636

Rémi Denis-Courmont remi at remlab.net
Wed Jun 9 09:43:35 CEST 2010


No objection, if it fixes the bug, it should be merged. I am unable to do
VLC work today and tomorrow.

However, several developers objected to the complexity of doVolumeChanges
(to me, as I merged it). And I admit I do not fully grasp it myself anymore
either. I am not sure that merging everything in one function with plenty
of parameters was such a great idea. Oh well, too late for 1.1 anyway.

On Wed,  9 Jun 2010 01:13:56 +0200, Francois Cartegnie <fcvlcdev at free.fr>
wrote:
> ---
>  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 )
>      {
> --
> 1.6.4.4
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis




More information about the vlc-devel mailing list