[vlc-commits] spatialaudio: fix invalid block length

Thomas Guillem git at videolan.org
Mon Sep 18 14:17:13 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Sep 18 14:16:10 2017 +0200| [b6ea6f5d1910bbe5853b57da6de4ae2a05e96602] | committer: Thomas Guillem

spatialaudio: fix invalid block length

It was caused by integer overflow.

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

 modules/audio_filter/channel_mixer/spatialaudio.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_filter/channel_mixer/spatialaudio.cpp b/modules/audio_filter/channel_mixer/spatialaudio.cpp
index 6482b7dc7b..09b869b2e1 100644
--- a/modules/audio_filter/channel_mixer/spatialaudio.cpp
+++ b/modules/audio_filter/channel_mixer/spatialaudio.cpp
@@ -186,7 +186,7 @@ static block_t *Mix( filter_t *p_filter, block_t *p_buf )
     else
         p_out_buf->i_pts = p_sys->i_inputPTS;
     p_out_buf->i_dts = p_out_buf->i_pts;
-    p_out_buf->i_length = p_out_buf->i_nb_samples * 1000000 / p_sys->i_rate;
+    p_out_buf->i_length = p_out_buf->i_nb_samples * INT64_C(1000000) / p_sys->i_rate;
 
     float *p_dest = (float *)p_out_buf->p_buffer;
     const float *p_src = (float *)p_sys->inputSamples.data();



More information about the vlc-commits mailing list