vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Jun  8 
11:47:43 2014 +0300| [91e57b1625e1d063afbd92202117e11b53389fa0] | committer: 
Rémi Denis-Courmont

flac: fix undefined left shift of negative value

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

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

diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index 611c3db..0d23842 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -134,7 +134,7 @@ static void Interleave( int32_t *p_out, const int32_t * 
const *pp_in,
 
     for( unsigned j = 0; j < i_samples; j++ )
         for( unsigned i = 0; i < i_nb_channels; i++ )
-            p_out[j * i_nb_channels + i] = pp_in[pi_index[i]][j] << shift;
+            p_out[j * i_nb_channels + i] = ((uint32_t)pp_in[pi_index[i]][j]) 
<< shift;
 }
 
 /*****************************************************************************

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to