aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-11 16:23:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-11 16:23:29 +0200
commited1ad2f5ebe9ad4ee8700760e97d30ca5b75d9ec (patch)
tree7a3a82e99298665531bde5af4ef94ac5812ce1a5
parentc2eb668617555cb8b8bcfb9796241ada9471ac65 (diff)
parentb3d8276d2dc913d708d187fb15f6e98869d00500 (diff)
downloadffmpeg-ed1ad2f5ebe9ad4ee8700760e97d30ca5b75d9ec.tar.gz
Merge commit 'b3d8276d2dc913d708d187fb15f6e98869d00500' into release/2.2
* commit 'b3d8276d2dc913d708d187fb15f6e98869d00500': dcadec: Do not decode the XCh extension when downmixing to stereo Conflicts: libavcodec/dcadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dcadec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index b5604f6ca8..de94f9ec17 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -2329,6 +2329,17 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
{ /* xxx should also do MA extensions */
if (s->amode < 16) {
avctx->channel_layout = dca_core_channel_layout[s->amode];
+
+ if (s->prim_channels + !!s->lfe > 2 &&
+ avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {
+ /*
+ * Neither the core's auxiliary data nor our default tables contain
+ * downmix coefficients for the additional channel coded in the XCh
+ * extension, so when we're doing a Stereo downmix, don't decode it.
+ */
+ s->xch_disable = 1;
+ }
+
#if FF_API_REQUEST_CHANNELS
FF_DISABLE_DEPRECATION_WARNINGS
if (s->xch_present && !s->xch_disable &&