[FFmpeg-cvslog] Fix channel order for 7.1 TrueHD samples.

Carl Eugen Hoyos git at videolan.org
Thu Apr 14 05:10:33 CEST 2011


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Apr 14 03:43:58 2011 +0200| [6daf513cf24a99ddddb7e748fc150f37bcd323f3] | committer: Carl Eugen Hoyos

Fix channel order for 7.1 TrueHD samples.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6daf513cf24a99ddddb7e748fc150f37bcd323f3
---

 libavcodec/mlpdec.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 71b26af..044df5b 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);
 



More information about the ffmpeg-cvslog mailing list