vlc | branch: master | Filip Roséen <[email protected]> | Wed Jul 25 03:51:15 2018 +0200| [91450e0f82ee2aff93db31b2aa4d520614551d24] | committer: Jean-Baptiste Kempf
control: oldrc: make it possible to adjust volume without playback I don't know why 33464eacd6e introduced logic to prevent volume change if the input is either paused, or not at all present, but from a user's perspective this is not intuitive (as one of course can adjust the volume even if nothing is playing). fixes: #20897 Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91450e0f82ee2aff93db31b2aa4d520614551d24 --- modules/control/oldrc.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c index 4d400e23e7..7a780e868d 100644 --- a/modules/control/oldrc.c +++ b/modules/control/oldrc.c @@ -1422,23 +1422,8 @@ static int Volume( vlc_object_t *p_this, char const *psz_cmd, VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data); intf_thread_t *p_intf = (intf_thread_t*)p_this; playlist_t *p_playlist = p_intf->p_sys->p_playlist; - input_thread_t *p_input = playlist_CurrentInput( p_playlist ); int i_error = VLC_EGENERIC; - if( !p_input ) - return VLC_ENOOBJ; - - if( p_input ) - { - int state = var_GetInteger( p_input, "state" ); - vlc_object_release( p_input ); - if( state == PAUSE_S ) - { - msg_rc( "%s", _("Type 'pause' to continue.") ); - return VLC_EGENERIC; - } - } - if ( *newval.psz_string ) { /* Set. */ @@ -1466,22 +1451,9 @@ static int VolumeMove( vlc_object_t *p_this, char const *psz_cmd, VLC_UNUSED(oldval); VLC_UNUSED(p_data); intf_thread_t *p_intf = (intf_thread_t*)p_this; float volume; - input_thread_t *p_input = - playlist_CurrentInput( p_intf->p_sys->p_playlist ); int i_nb_steps = atoi(newval.psz_string); int i_error = VLC_SUCCESS; - if( !p_input ) - return VLC_ENOOBJ; - - int state = var_GetInteger( p_input, "state" ); - vlc_object_release( p_input ); - if( state == PAUSE_S ) - { - msg_rc( "%s", _("Type 'pause' to continue.") ); - return VLC_EGENERIC; - } - if( !strcmp(psz_cmd, "voldown") ) i_nb_steps *= -1; if( playlist_VolumeUp( p_intf->p_sys->p_playlist, i_nb_steps, &volume ) < 0 ) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
