summaryrefslogtreecommitdiff
path: root/libavcodec/dca.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r--libavcodec/dca.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index aa71411efa..fc5c0b5558 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -1838,14 +1838,13 @@ static av_cold int dca_decode_init(AVCodecContext * avctx)
s->samples_chanptr[i] = s->samples + i * 256;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
- s->scale_bias = 1.0;
-
- /* allow downmixing to stereo */
- if (avctx->channels > 0 && avctx->request_channels < avctx->channels &&
- avctx->request_channels == 2) {
- avctx->channels = avctx->request_channels;
- }
+ s->scale_bias = 1.0;
+ /* allow downmixing to stereo */
+ if (avctx->channels > 0 && avctx->request_channels < avctx->channels &&
+ avctx->request_channels == 2) {
+ avctx->channels = avctx->request_channels;
+ }
return 0;
}