aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-11-28 15:25:39 +0100
committerNicolas George <nicolas.george@normalesup.org>2012-12-08 10:12:38 +0100
commite6701d51e1c7c0b33c567b50d7c3d7adf35a5823 (patch)
treecc2fa95f9149e435f37d42fb1fd34e1c265b0d5c
parent3fd60d804996031ceaba9cad0b38652b92551eb0 (diff)
downloadffmpeg-e6701d51e1c7c0b33c567b50d7c3d7adf35a5823.tar.gz
lavc/mlpdec: reset layout when channels change.
Triggered by the sample for trac ticket #1726.
-rw-r--r--libavcodec/mlpdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 753fff11ea..c7de13c15c 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;
}