diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-05 22:27:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-05 22:27:34 +0100 |
commit | bc7f76377c1e8850af163646a98ab086a84f5d66 (patch) | |
tree | e9601aa8be8325fc6fed43a0e479bdb3621f4aaa /libavcodec/dcadec.c | |
parent | 4cf4da9dc5814aebe8881d93b4a88f593b774448 (diff) | |
parent | 6bfdb2de881372048be7fbda643417e1fd3ce93c (diff) | |
download | ffmpeg-bc7f76377c1e8850af163646a98ab086a84f5d66.tar.gz |
Merge commit '6bfdb2de881372048be7fbda643417e1fd3ce93c'
* commit '6bfdb2de881372048be7fbda643417e1fd3ce93c':
dcadec: set the output channel mode more accurately.
Conflicts:
libavcodec/dcadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dcadec.c')
-rw-r--r-- | libavcodec/dcadec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index cc2fa0af12..d7af481449 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -2190,6 +2190,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data, s->downmix_coef[i][1] = (!code ? 0.0f : sign * dca_dmixtable[code - 1]); } + s->output = s->core_downmix_amode; } else { int am = s->amode & DCA_CHANNEL_MASK; if (am >= FF_ARRAY_ELEMS(dca_default_coeffs)) { @@ -2375,7 +2376,7 @@ FF_ENABLE_DEPRECATION_WARNINGS if (s->prim_channels + !!s->lfe > 2 && avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) { channels = 2; - s->output = DCA_STEREO; + s->output = s->prim_channels == 2 ? s->amode : DCA_STEREO; avctx->channel_layout = AV_CH_LAYOUT_STEREO; } else if (avctx->request_channel_layout & AV_CH_LAYOUT_NATIVE) { |