Browse Source

check for request_channels in dca init function

Originally committed as revision 11423 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Justin Ruggles 18 years ago
parent
commit
cfec09e914
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavcodec/dca.c

+ 7
- 0
libavcodec/dca.c View File

@@ -1230,6 +1230,13 @@ static int dca_decode_init(AVCodecContext * avctx)
pre_calc_cosmod(s);

dsputil_init(&s->dsp, avctx);

/* allow downmixing to stereo */
if (avctx->channels > 0 && avctx->request_channels < avctx->channels &&
avctx->request_channels == 2) {
avctx->channels = avctx->request_channels;
}

return 0;
}



Loading…
Cancel
Save