comparison dca.c @ 5576:1a92e129a679 libavcodec

Add request_channels member to AVCodecContext so we now have a proper way to tell the decoder how many output channels we would like.
author reimar
date Thu, 23 Aug 2007 20:28:28 +0000
parents b2b6d7f4cda4
children abf90ea2c392
comparison
equal deleted inserted replaced
5575:a6f5ed050335 5576:1a92e129a679
1156 //set AVCodec values with parsed data 1156 //set AVCodec values with parsed data
1157 avctx->sample_rate = s->sample_rate; 1157 avctx->sample_rate = s->sample_rate;
1158 avctx->bit_rate = s->bit_rate; 1158 avctx->bit_rate = s->bit_rate;
1159 1159
1160 channels = s->prim_channels + !!s->lfe; 1160 channels = s->prim_channels + !!s->lfe;
1161 avctx->channels = avctx->request_channels;
1161 if(avctx->channels == 0) { 1162 if(avctx->channels == 0) {
1162 avctx->channels = channels; 1163 avctx->channels = channels;
1163 } else if(channels < avctx->channels) { 1164 } else if(channels < avctx->channels) {
1164 av_log(avctx, AV_LOG_WARNING, "DTS source channels are less than " 1165 av_log(avctx, AV_LOG_WARNING, "DTS source channels are less than "
1165 "specified: output to %d channels.\n", channels); 1166 "specified: output to %d channels.\n", channels);