aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mlpdec.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-04-25 16:26:58 -0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2017-04-26 11:21:27 -0400
commit94c54d97e7f4fe90570c323803f2bdf6246c1010 (patch)
tree65a8e2410efa07825bae843e71cefcbb18a54047 /libavcodec/mlpdec.c
parentcea7fd9afb8488a6c48f7d7ee38602e1fd3dd425 (diff)
downloadffmpeg-94c54d97e7f4fe90570c323803f2bdf6246c1010.tar.gz
mlp: Factor out channel layout subset checks
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 9ce32c832e..fa94f6f5b4 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -511,8 +511,8 @@ static int read_restart_header(MLPDecodeContext *m, BitstreamContext *bc,
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",