summaryrefslogtreecommitdiff
path: root/libavcodec/mlp_parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-09 02:36:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-09 02:37:17 +0100
commit4040b56f5afd07df6403df2a76206b54c79449cf (patch)
tree68d1be3b443549542ee36afd7387cb78daa59396 /libavcodec/mlp_parser.c
parent73be2ebe96ee09dbd7c99f0ee0891fb0f585cdc2 (diff)
parentc1e7de8f62c7fd71e23d62969a618f042059381f (diff)
downloadffmpeg-4040b56f5afd07df6403df2a76206b54c79449cf.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: mlp_parser: fix request_channel_layout behavior. Conflicts: libavcodec/mlp_parser.c See: bd35d58463f01f7781df052864ae16f5e228c1bc Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mlp_parser.c')
-rw-r--r--libavcodec/mlp_parser.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 39dbcf9673..dae19e756b 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -343,7 +343,9 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
} else
#endif
- if (avctx->request_channel_layout == AV_CH_LAYOUT_STEREO &&
+ if (avctx->request_channel_layout &&
+ (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==
+ avctx->request_channel_layout &&
mh.num_substreams > 1) {
avctx->channels = 2;
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
@@ -366,13 +368,16 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
} else
#endif
- if (avctx->request_channel_layout == AV_CH_LAYOUT_STEREO &&
- mh.num_substreams > 1) {
+ if (avctx->request_channel_layout &&
+ (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) ==
+ avctx->request_channel_layout &&
+ mh.num_substreams > 1) {
avctx->channels = 2;
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
} else if (!mh.channels_thd_stream2 ||
- ((mh.channel_layout_thd_stream1 & avctx->request_channel_layout) ==
- avctx->request_channel_layout && avctx->request_channel_layout)) {
+ (avctx->request_channel_layout &&
+ (avctx->request_channel_layout & mh.channel_layout_thd_stream1) ==
+ avctx->request_channel_layout)) {
avctx->channels = mh.channels_thd_stream1;
avctx->channel_layout = mh.channel_layout_thd_stream1;
} else {