[vlc-commits] trivial_mixer: fix arithmetic

Rémi Denis-Courmont git at videolan.org
Tue Nov 4 22:22:40 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov  4 23:22:18 2014 +0200| [4d6a9eaa413c73277648d4f98c5da1840f997b33] | committer: Rémi Denis-Courmont

trivial_mixer: fix arithmetic

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

 modules/audio_filter/channel_mixer/trivial.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c
index ab804d5..c75c4e1 100644
--- a/modules/audio_filter/channel_mixer/trivial.c
+++ b/modules/audio_filter/channel_mixer/trivial.c
@@ -74,7 +74,7 @@ static block_t *Upmix( filter_t *p_filter, block_t *p_in_buf )
     for( size_t i = 0; i < p_in_buf->i_nb_samples; i++ )
     {
         for( unsigned j = 0; j < i_output_nb; j++ )
-            p_dest[j] = p_src[j];
+            p_dest[j] = p_src[j % i_input_nb];
 
         p_src += i_input_nb;
         p_dest += i_output_nb;
@@ -100,7 +100,7 @@ static block_t *Downmix( filter_t *p_filter, block_t *p_buf )
     for( size_t i = 0; i < p_buf->i_nb_samples; i++ )
     {
         for( unsigned j = 0; j < i_output_nb; j++ )
-            p_dest[j] = p_src[j % i_input_nb];
+            p_dest[j] = p_src[j];
 
         p_src += i_input_nb;
         p_dest += i_output_nb;



More information about the vlc-commits mailing list