]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mlpdec.c
Merge commit '511cf612ac979f536fd65e14603a87ca5ad435f3'
[ffmpeg] / libavcodec / mlpdec.c
index 753fff11ea20d494c0bb734269db9d9608f5fd11..c7de13c15c8db74d1837196e1e5cf5c7e8914efd 100644 (file)
@@ -524,8 +524,11 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
         cp->huff_lsbs        = 24;
     }
 
-    if (substr == m->max_decoded_substream)
+    if (substr == m->max_decoded_substream &&
+        m->avctx->channels != s->max_matrix_channel + 1) {
         m->avctx->channels = s->max_matrix_channel + 1;
+        m->avctx->channel_layout = 0;
+    }
 
     return 0;
 }