[vlc-commits] directsound: Fix volume range
Hugo Beauzée-Luyssen
git at videolan.org
Thu Dec 29 10:00:18 CET 2016
vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Dec 27 17:28:58 2016 +0100| [4ff7fe9ff8b8894dcaa8a9e2b297fb83dbd28e78] | committer: Jean-Baptiste Kempf
directsound: Fix volume range
Setting an integer limit on a float will yield UB when trying to clamp
the volume within its given range.
Fix #17659
(cherry picked from commit 2068e2f6f69aef3f950757644e95ed9d78f48ab9)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=4ff7fe9ff8b8894dcaa8a9e2b297fb83dbd28e78
---
modules/audio_output/directsound.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index 51788f5..ed11194 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -87,7 +87,7 @@ vlc_module_begin ()
change_string_list( speaker_list, speaker_list )
add_float( "directx-volume", 1.0f,
VOLUME_TEXT, VOLUME_LONGTEXT, true )
- change_integer_range( DSBVOLUME_MIN, DSBVOLUME_MAX )
+ change_float_range( 0.f, 2.f )
set_callbacks( Open, Close )
More information about the vlc-commits
mailing list