[vlc-commits] codec: faad: fix FDK channel ordering (fix #16457)
Francois Cartegnie
git at videolan.org
Mon Mar 6 17:42:30 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar 6 17:39:22 2017 +0100| [ecdc9508254616b600b82e281778f1ac9f040291] | committer: Francois 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ecdc9508254616b600b82e281778f1ac9f040291
---
modules/codec/faad.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index 717b2b0..c87a813 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -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};
More information about the vlc-commits
mailing list