diff options
author | James Almer <jamrial@gmail.com> | 2017-10-30 17:20:45 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-30 17:20:45 -0300 |
commit | 34542ac033f81601fd4dd684e993cc1716bb9a4d (patch) | |
tree | 06aa634cdc41b96b0f7bfc97f634ab73f1bcd99f /libavcodec/mlpdec.c | |
parent | 9484b9f4ba66a96b9b565f33f1eeb6e9b9b79e96 (diff) | |
parent | 970c76f32283bddf3a5afd24fe52db7a96186244 (diff) | |
download | ffmpeg-34542ac033f81601fd4dd684e993cc1716bb9a4d.tar.gz |
Merge commit '970c76f32283bddf3a5afd24fe52db7a96186244'
* commit '970c76f32283bddf3a5afd24fe52db7a96186244':
mlp_parser: Drop in-parser downmix functionality
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 4d40e18f6e..63ec3e64bd 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -180,6 +180,11 @@ static const uint64_t thd_channel_order[] = { AV_CH_LOW_FREQUENCY_2, // LFE2 }; +static int mlp_channel_layout_subset(uint64_t channel_layout, uint64_t mask) +{ + return channel_layout && ((channel_layout & mask) == channel_layout); +} + static uint64_t thd_channel_layout_extract_channel(uint64_t channel_layout, int index) { @@ -533,7 +538,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, s->max_channel = max_channel; s->max_matrix_channel = max_matrix_channel; - if (ff_mlp_channel_layout_subset(m->avctx->request_channel_layout, s->mask) && + if (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. " |