aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-04-14 03:43:58 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-04-14 03:43:58 +0200
commit6daf513cf24a99ddddb7e748fc150f37bcd323f3 (patch)
tree59ba718cf65a3cc4ea3aab75c2585b909cd37b28
parent939a12e25d956850613f9c6c416e12de305f444b (diff)
downloadffmpeg-6daf513cf24a99ddddb7e748fc150f37bcd323f3.tar.gz
Fix channel order for 7.1 TrueHD samples.
-rw-r--r--libavcodec/mlpdec.c5
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);