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

codec: faad: fix FDK channel ordering (fix #16457)

FAAD can't properly map channels with instance > 2.
This will fix it at least for the FDK setup.
parent d21822f5
......@@ -440,6 +440,14 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
p_sys->b_ps = frame.ps;
}
/* Hotfix channels misdetection/repetition for FDK 7.1 */
const uint8_t fdk71config[] = { 1, 2, 3, 6, 7, 6, 7, 9 };
if( frame.channels == 8 && !memcmp( frame.channel_position, fdk71config, 8 ) )
{
frame.channel_position[3] = 4;
frame.channel_position[4] = 5;
}
/* Convert frame.channel_position to our own channel values */
p_dec->fmt_out.audio.i_physical_channels = 0;
uint32_t pi_faad_channels_positions[FAAD_CHANNEL_ID_COUNT] = {0};
......
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