diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-04-14 03:43:58 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-04-14 03:43:58 +0200 |
commit | 6daf513cf24a99ddddb7e748fc150f37bcd323f3 (patch) | |
tree | 59ba718cf65a3cc4ea3aab75c2585b909cd37b28 | |
parent | 939a12e25d956850613f9c6c416e12de305f444b (diff) | |
download | ffmpeg-6daf513cf24a99ddddb7e748fc150f37bcd323f3.tar.gz |
Fix channel order for 7.1 TrueHD samples.
-rw-r--r-- | libavcodec/mlpdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 71b26af3e0..044df5bc6a 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -453,6 +453,11 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, FFSWAP(int, s->ch_assign[3], s->ch_assign[5]); } } + if (m->avctx->codec_id == CODEC_ID_TRUEHD && + m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1) { + FFSWAP(int, s->ch_assign[4], s->ch_assign[6]); + FFSWAP(int, s->ch_assign[5], s->ch_assign[7]); + } checksum = ff_mlp_restart_checksum(buf, get_bits_count(gbp) - start_count); |