[vlc-commits] faad: Fix channel reordering loop.

Hugo Beauzée-Luyssen git at videolan.org
Fri May 4 15:45:52 CEST 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed May  2 15:37:31 2012 +0200| [e6050c742c28f3ba714cbadda19e11dab1cdd625] | committer: Hugo Beauzée-Luyssen

faad: Fix channel reordering loop.

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

 modules/codec/faad.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index 2a779db..57870e6 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -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++ )



More information about the vlc-commits mailing list