[FFmpeg-cvslog] lavc/mlpdec: reset layout when channels change.

Nicolas George git at videolan.org
Sat Dec 8 11:06:16 CET 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Wed Nov 28 15:25:39 2012 +0100| [e6701d51e1c7c0b33c567b50d7c3d7adf35a5823] | committer: Nicolas George

lavc/mlpdec: reset layout when channels change.

Triggered by the sample for trac ticket #1726.

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

 libavcodec/mlpdec.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 753fff1..c7de13c 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list