Commit f20751f3 authored by François Cartegnie's avatar François Cartegnie 🤞

codec: faad: don't reorder with random table

heap buffer ofw on no reorder

(cherry picked from commit 790d6b1f)
parent 4dd10ad6
......@@ -525,7 +525,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
else pi_faad_channels_positions[i] = 0;
}
aout_CheckChannelReorder( pi_faad_channels_positions, NULL,
bool b_reorder = aout_CheckChannelReorder( pi_faad_channels_positions, NULL,
p_dec->fmt_out.audio.i_physical_channels, pi_neworder_table );
......@@ -546,9 +546,10 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
memset( p_out->p_buffer, 0, p_out->i_buffer );
/* FIXME: replace when aout_channel_reorder can take samples from a different buffer */
DoReordering( (uint32_t *)p_out->p_buffer, samples,
frame.samples / frame.channels, frame.channels,
pi_neworder_table );
if( b_reorder )
DoReordering( (uint32_t *)p_out->p_buffer, samples,
frame.samples / frame.channels, frame.channels,
pi_neworder_table );
if( p_sys->b_discontinuity )
{
......
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