diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-23 16:44:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-23 16:44:30 +0100 |
commit | 826188d27acdef6bf14edf018415e958f59ecfdd (patch) | |
tree | 09fd9e72118f51f60452f3b6ccb25af6cc1e9c0b /libavcodec/mlpdec.c | |
parent | 86b892af199d420fe2bcf5f8fb96c377d924ad43 (diff) | |
parent | ed1b01131e662c9086b27aaaea69684d8575fbea (diff) | |
download | ffmpeg-826188d27acdef6bf14edf018415e958f59ecfdd.tar.gz |
Merge commit 'ed1b01131e662c9086b27aaaea69684d8575fbea'
* commit 'ed1b01131e662c9086b27aaaea69684d8575fbea':
mlp: implement support for AVCodecContext.request_channel_layout.
Conflicts:
libavcodec/mlpdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 5032b31bb8..d22a2bd8dc 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -490,14 +490,24 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, s->max_channel = max_channel; s->max_matrix_channel = matrix_channel; - if (m->avctx->request_channels > 0 - && s->max_channel + 1 >= m->avctx->request_channels - && substr < m->max_decoded_substream) { +#if FF_API_REQUEST_CHANNELS + if (m->avctx->request_channels > 0 && + m->avctx->request_channels <= s->max_channel + 1 && + m->max_decoded_substream > substr) { av_log(m->avctx, AV_LOG_DEBUG, - "Extracting %d channel downmix from substream %d. " + "Extracting %d-channel downmix from substream %d. " "Further substreams will be skipped.\n", s->max_channel + 1, substr); m->max_decoded_substream = substr; + } else +#endif + if (m->avctx->request_channel_layout == s->ch_layout && + m->max_decoded_substream > substr) { + av_log(m->avctx, AV_LOG_DEBUG, + "Extracting %d-channel downmix (0x%"PRIx64") from substream %d. " + "Further substreams will be skipped.\n", + s->max_channel + 1, s->ch_layout, substr); + m->max_decoded_substream = substr; } s->noise_shift = get_bits(gbp, 4); |