[vlc-commits] vorbis (tremor): fix undefined left shift of negative value

Rémi Denis-Courmont git at videolan.org
Sun Jun 8 10:48:16 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun  8 11:47:57 2014 +0300| [a780f4841ec764d2f6e10e7981c15e4c3edf50d9] | committer: Rémi Denis-Courmont

vorbis (tremor): fix undefined left shift of negative value

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

 modules/codec/vorbis.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 4550563..7c136da 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -471,7 +471,7 @@ static void Interleave( INTERLEAVE_TYPE *p_out, const INTERLEAVE_TYPE **pp_in,
     for( int j = 0; j < i_samples; j++ )
         for( int i = 0; i < i_nb_channels; i++ )
 #ifdef MODULE_NAME_IS_tremor
-            p_out[j * i_nb_channels + pi_chan_table[i]] = pp_in[i][j] << 8;
+            p_out[j * i_nb_channels + pi_chan_table[i]] = ((uint32_t)pp_in[i][j]) << 8;
 #else
             p_out[j * i_nb_channels + pi_chan_table[i]] = pp_in[i][j];
 #endif



More information about the vlc-commits mailing list