OSDN Git Service

mlpdec: fix channel order for wide 7.1 truehd layouts
authorHendrik Leppkes <h.leppkes@gmail.com>
Sun, 18 Dec 2011 14:25:25 +0000 (15:25 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 18 Dec 2011 14:25:25 +0000 (15:25 +0100)
libavcodec/mlpdec.c

index e912950..339c757 100644 (file)
@@ -476,7 +476,8 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
         }
     }
     if (m->avctx->codec_id == CODEC_ID_TRUEHD &&
-        m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1) {
+        (m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1 ||
+        m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1_WIDE)) {
         FFSWAP(int, s->ch_assign[4], s->ch_assign[6]);
         FFSWAP(int, s->ch_assign[5], s->ch_assign[7]);
     }