mlpdec: set the channel layout.
authorTim Walker <tdskywalker@gmail.com>
Mon, 31 Dec 2012 14:33:25 +0000 (15:33 +0100)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 22 Jan 2013 21:10:02 +0000 (16:10 -0500)
Fixes bug 401.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org

libavcodec/mlpdec.c

index f8c647a..80ff401 100644 (file)
@@ -520,8 +520,10 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
         cp->huff_lsbs        = 24;
     }
 
-    if (substr == m->max_decoded_substream)
-        m->avctx->channels = s->max_matrix_channel + 1;
+    if (substr == m->max_decoded_substream) {
+        m->avctx->channels       = s->max_matrix_channel + 1;
+        m->avctx->channel_layout = s->ch_layout;
+    }
 
     return 0;
 }