From c0c45188e56cfa3050bb39f8299025345b8a204c Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Thu, 6 Feb 2014 21:50:38 +0000 Subject: mlp: improve request_channel_layout behavior. Don't decode further substreams if request_channel_layout is a subset of the current substream's channel_layout. Before, we would only discard further substreams if request_channel_layout matched the substream's channel_layout extactly, thus decoding additional channels which the caller would probably end up downmixing. --- libavcodec/mlpdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/mlpdec.c') diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 76ce4c4367..d8a76f554a 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -504,8 +504,8 @@ FF_DISABLE_DEPRECATION_WARNINGS } else FF_ENABLE_DEPRECATION_WARNINGS #endif - if (m->avctx->request_channel_layout == s->ch_layout && - m->max_decoded_substream > substr) { + if ((s->ch_layout & m->avctx->request_channel_layout) == + m->avctx->request_channel_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", -- cgit v1.2.3