comparison ac3dec.c @ 6112:1e77145f9c74 libavcodec

check for request_channels at codec init
author jbr
date Sat, 05 Jan 2008 15:22:53 +0000
parents 75804d49f33b
children 5e7585cd5fd3
comparison
equal deleted inserted replaced
6111:ed3937d4f2aa 6112:1e77145f9c74
310 } else { 310 } else {
311 s->add_bias = 0.0f; 311 s->add_bias = 0.0f;
312 s->mul_bias = 32767.0f; 312 s->mul_bias = 32767.0f;
313 } 313 }
314 314
315 /* allow downmixing to stereo or mono */
316 if (avctx->channels > 0 && avctx->request_channels > 0 &&
317 avctx->request_channels < avctx->channels &&
318 avctx->request_channels <= 2) {
319 avctx->channels = avctx->request_channels;
320 }
321
315 return 0; 322 return 0;
316 } 323 }
317 324
318 /** 325 /**
319 * Parse the 'sync info' and 'bit stream info' from the AC-3 bitstream. 326 * Parse the 'sync info' and 'bit stream info' from the AC-3 bitstream.