Merge commit 'c0c45188e56cfa3050bb39f8299025345b8a204c'

* commit 'c0c45188e56cfa3050bb39f8299025345b8a204c':
  mlp: improve request_channel_layout behavior.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/43/merge
Michael Niedermayer 11 years ago
commit aedc10137d
  1. 5
      libavcodec/mlp_parser.c
  2. 4
      libavcodec/mlpdec.c

@ -370,8 +370,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
mh.num_substreams > 1) {
avctx->channels = 2;
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
} else if (avctx->request_channel_layout == mh.channel_layout_thd_stream1 ||
!mh.channels_thd_stream2) {
} else if (!mh.channels_thd_stream2 ||
(mh.channel_layout_thd_stream1 & avctx->request_channel_layout) ==
avctx->request_channel_layout) {
avctx->channels = mh.channels_thd_stream1;
avctx->channel_layout = mh.channel_layout_thd_stream1;
} else {

@ -528,8 +528,8 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
} else
#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",

Loading…
Cancel
Save