Commit 844b5f3b authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

codec: lpcm: reorder channels only after decoding (fix #14114)

24bit LPCM is packed and can't be reordered without introducing
clipping issues.

(cherry picked from commit ab727f94736c1e34ee75d920689621e72ae080c9)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent fc6d0fc4
......@@ -434,13 +434,6 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
p_block->p_buffer += p_sys->i_header_size + i_padding;
p_block->i_buffer -= p_sys->i_header_size + i_padding;
if( p_sys->i_chans_to_reorder )
{
aout_ChannelReorder( p_block->p_buffer, p_block->i_buffer,
p_sys->i_chans_to_reorder, p_sys->pi_chan_table,
p_dec->fmt_out.i_codec );
}
switch( p_sys->i_type )
{
case LPCM_WIDI:
......@@ -457,6 +450,13 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
break;
}
if( p_sys->i_chans_to_reorder )
{
aout_ChannelReorder( p_aout_buffer->p_buffer, p_aout_buffer->i_buffer,
p_sys->i_chans_to_reorder, p_sys->pi_chan_table,
p_dec->fmt_out.i_codec );
}
block_Release( p_block );
return p_aout_buffer;
}
......
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