]> git.sesse.net Git - vlc/commitdiff
faad: Fix channel reordering loop.
authorHugo Beauzée-Luyssen <beauze.h@gmail.com>
Wed, 2 May 2012 13:37:31 +0000 (15:37 +0200)
committerHugo Beauzée-Luyssen <beauze.h@gmail.com>
Fri, 4 May 2012 13:45:45 +0000 (15:45 +0200)
modules/codec/faad.c

index 2a779db29a660312032a480940a705e9cabd0209..57870e6bf6c87fb6b11b2819e12687bb013471f4 100644 (file)
@@ -436,7 +436,8 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 
         /* Convert frame.channel_position to our own channel values */
         p_dec->fmt_out.audio.i_physical_channels = 0;
-        for( i = 0; i < frame.channels; i++ )
+        const uint32_t nbChannels = frame.channels;
+        for( i = 0; i < nbChannels; i++ )
         {
             /* Find the channel code */
             for( j = 0; j < MAX_CHANNEL_POSITIONS; j++ )