[vlc-commits] flac: fix same loop var for inner loops

Lyndon Brown git at videolan.org
Wed Mar 20 15:34:43 CET 2019


vlc | branch: master | Lyndon Brown <jnqnfe at gmail.com> | Mon Mar 18 07:07:58 2019 +0000| [07ae0d6ff3c166bf7d7f07abf83e0d660959e372] | committer: Thomas Guillem

flac: fix same loop var for inner loops

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/codec/flac.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index 8974d33d18..da8a90416b 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -347,10 +347,10 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder,
                         {
                             if( (i_chan & i_wfxmask) == 0 )
                                 continue;
-                            for( size_t i=0; i<MAPPED_WFX_CHANNELS; i++ )
+                            for( size_t j=0; j<MAPPED_WFX_CHANNELS; j++ )
                             {
-                                if( wfx_remapping[i][0] == i_chan )
-                                    i_vlcmask |= wfx_remapping[i][1];
+                                if( wfx_remapping[j][0] == i_chan )
+                                    i_vlcmask |= wfx_remapping[j][1];
                             }
                         }
                         /* Check if we have the 1 to 1 mapping */
@@ -367,8 +367,8 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder,
 
                         /* /!\ Invert our source/dest reordering,
                          * as Interleave() here works source indexes */
-                        for( unsigned i=0; i<i_wfxchannels; i++ )
-                            p_sys->rgi_channels_reorder[neworder[i]] = i;
+                        for( unsigned j=0; j<i_wfxchannels; j++ )
+                            p_sys->rgi_channels_reorder[neworder[j]] = j;
 
                         p_dec->fmt_out.audio.i_physical_channels = i_vlcmask;
                         p_dec->fmt_out.audio.i_channels = i_wfxchannels;



More information about the vlc-commits mailing list