diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-11-28 15:25:39 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-12-08 10:12:38 +0100 |
commit | e6701d51e1c7c0b33c567b50d7c3d7adf35a5823 (patch) | |
tree | cc2fa95f9149e435f37d42fb1fd34e1c265b0d5c | |
parent | 3fd60d804996031ceaba9cad0b38652b92551eb0 (diff) | |
download | ffmpeg-e6701d51e1c7c0b33c567b50d7c3d7adf35a5823.tar.gz |
lavc/mlpdec: reset layout when channels change.
Triggered by the sample for trac ticket #1726.
-rw-r--r-- | libavcodec/mlpdec.c | 5 |
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; } |