Commit e6050c74 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

faad: Fix channel reordering loop.

parent fa3efbec
......@@ -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++ )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment