[vlc-commits] dbus: fix volume setting (fix #9628)

Rémi Denis-Courmont git at videolan.org
Wed Oct 9 19:57:17 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Oct  9 20:57:04 2013 +0300| [593fa45661ed7dd6c93b9dbe960f6dc8850df4f9] | committer: Rémi Denis-Courmont

dbus: fix volume setting (fix #9628)

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

 modules/control/dbus/dbus_player.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/modules/control/dbus/dbus_player.c b/modules/control/dbus/dbus_player.c
index 88fc7e9..3d37e6a 100644
--- a/modules/control/dbus/dbus_player.c
+++ b/modules/control/dbus/dbus_player.c
@@ -179,10 +179,7 @@ DBUS_METHOD( VolumeSet )
     if( VLC_SUCCESS != DemarshalSetPropertyValue( p_from, &d_dbus_vol ) )
         return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 
-    d_dbus_vol *= AOUT_VOLUME_DEFAULT;
-    if( d_dbus_vol < 0. )
-        d_dbus_vol = 0.;
-    playlist_VolumeSet( PL, d_dbus_vol );
+    playlist_VolumeSet( PL, fmaxf( d_dbus_vol, 0.f ) );
 
     REPLY_SEND;
 }



More information about the vlc-commits mailing list