[vlc-commits] lib: fix volume range check in libvlc_audio_set_volume()

Rémi Denis-Courmont git at videolan.org
Tue May 20 13:10:28 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 19 19:04:13 2014 +0800| [589f091f58a8dcb9481e8b10da6df39696a36ca0] | committer: Rémi Denis-Courmont

lib: fix volume range check in libvlc_audio_set_volume()

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

 lib/audio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/audio.c b/lib/audio.c
index 8b93b55..9f42db1 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -334,7 +334,7 @@ int libvlc_audio_get_volume( libvlc_media_player_t *mp )
 int libvlc_audio_set_volume( libvlc_media_player_t *mp, int volume )
 {
     float vol = volume / 100.f;
-    if (vol < 0.f)
+    if (!isgreaterequal(vol, 0.f))
     {
         libvlc_printerr( "Volume out of range" );
         return -1;



More information about the vlc-commits mailing list