Merge commit 'c8cf461c19e8e35df4b7364d9b90aa42f1ab4560'

* commit 'c8cf461c19e8e35df4b7364d9b90aa42f1ab4560':
  dcadec: Do not decode the XCh extension when downmixing to stereo

Conflicts:
	libavcodec/dcadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-13 04:07:27 +02:00
commit 952614b899
1 changed files with 11 additions and 0 deletions

View File

@ -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 &&