Commit 790d6b1f authored by François Cartegnie's avatar François Cartegnie 🤞

codec: faad: don't reorder with random table

heap buffer ofw on no reorder
parent e7d72a70
...@@ -525,7 +525,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block ) ...@@ -525,7 +525,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
else pi_faad_channels_positions[i] = 0; 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 ); 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 ) ...@@ -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 ); memset( p_out->p_buffer, 0, p_out->i_buffer );
/* FIXME: replace when aout_channel_reorder can take samples from a different buffer */ /* FIXME: replace when aout_channel_reorder can take samples from a different buffer */
DoReordering( (uint32_t *)p_out->p_buffer, samples, if( b_reorder )
frame.samples / frame.channels, frame.channels, DoReordering( (uint32_t *)p_out->p_buffer, samples,
pi_neworder_table ); frame.samples / frame.channels, frame.channels,
pi_neworder_table );
if( p_sys->b_discontinuity ) 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