Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Feb 2014 01:36:46 +0000 (02:36 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Feb 2014 01:37:17 +0000 (02:37 +0100)
* qatar/master:
  mlp_parser: fix request_channel_layout behavior.

Conflicts:
libavcodec/mlp_parser.c

See: bd35d58463f01f7781df052864ae16f5e228c1bc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/mlp_parser.c

@@@ -340,10 -332,12 +340,12 @@@ FF_DISABLE_DEPRECATION_WARNING
                  mh.num_substreams > 1) {
                  avctx->channels       = 2;
                  avctx->channel_layout = AV_CH_LAYOUT_STEREO;
 -            } else
  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;
@@@ -363,11 -357,13 +365,13 @@@ FF_DISABLE_DEPRECATION_WARNING
                         avctx->request_channels <= mh.channels_thd_stream1) {
                  avctx->channels       = mh.channels_thd_stream1;
                  avctx->channel_layout = mh.channel_layout_thd_stream1;
 -            } else
  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 ||