Commit bc7f7637 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '6bfdb2de'

* commit '6bfdb2de':
  dcadec: set the output channel mode more accurately.

Conflicts:
	libavcodec/dcadec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 4cf4da9d 6bfdb2de
...@@ -2190,6 +2190,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data, ...@@ -2190,6 +2190,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
s->downmix_coef[i][1] = (!code ? 0.0f : s->downmix_coef[i][1] = (!code ? 0.0f :
sign * dca_dmixtable[code - 1]); sign * dca_dmixtable[code - 1]);
} }
s->output = s->core_downmix_amode;
} else { } else {
int am = s->amode & DCA_CHANNEL_MASK; int am = s->amode & DCA_CHANNEL_MASK;
if (am >= FF_ARRAY_ELEMS(dca_default_coeffs)) { if (am >= FF_ARRAY_ELEMS(dca_default_coeffs)) {
...@@ -2375,7 +2376,7 @@ FF_ENABLE_DEPRECATION_WARNINGS ...@@ -2375,7 +2376,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (s->prim_channels + !!s->lfe > 2 && if (s->prim_channels + !!s->lfe > 2 &&
avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) { avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) {
channels = 2; channels = 2;
s->output = DCA_STEREO; s->output = s->prim_channels == 2 ? s->amode : DCA_STEREO;
avctx->channel_layout = AV_CH_LAYOUT_STEREO; avctx->channel_layout = AV_CH_LAYOUT_STEREO;
} }
else if (avctx->request_channel_layout & AV_CH_LAYOUT_NATIVE) { else if (avctx->request_channel_layout & AV_CH_LAYOUT_NATIVE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment