[vlc-commits] directsound: Fix volume range
Hugo Beauzée-Luyssen
git at videolan.org
Thu Dec 29 09:39:30 CET 2016
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Dec 27 17:28:58 2016 +0100| [2068e2f6f69aef3f950757644e95ed9d78f48ab9] | committer: Hugo Beauzée-Luyssen
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
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2068e2f6f69aef3f950757644e95ed9d78f48ab9
---
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 55f1e7a..80be4ef 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