summaryrefslogtreecommitdiff
path: root/libavcodec/mlpdec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-30 16:52:36 -0300
committerJames Almer <jamrial@gmail.com>2017-10-30 16:52:36 -0300
commite3ebc293c624ff4cb9e225c269a466290788bb55 (patch)
tree792f73e38fac802369f02a9beb76b76fd4c3ec72 /libavcodec/mlpdec.c
parent1242a6170e93351b519a0b92861654d5ff14d8dc (diff)
parent94c54d97e7f4fe90570c323803f2bdf6246c1010 (diff)
downloadffmpeg-e3ebc293c624ff4cb9e225c269a466290788bb55.tar.gz
Merge commit '94c54d97e7f4fe90570c323803f2bdf6246c1010'
* commit '94c54d97e7f4fe90570c323803f2bdf6246c1010': mlp: Factor out channel layout subset checks Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r--libavcodec/mlpdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 0a6b0feb97..4d40e18f6e 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -533,8 +533,8 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
s->max_channel = max_channel;
s->max_matrix_channel = max_matrix_channel;
- if (m->avctx->request_channel_layout && (s->mask & m->avctx->request_channel_layout) ==
- m->avctx->request_channel_layout && m->max_decoded_substream > substr) {
+ if (ff_mlp_channel_layout_subset(m->avctx->request_channel_layout, s->mask) &&
+ 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",