comparison nellymoserenc.c @ 9627:b10d954527a2 libavcodec

Support 16K samplerate in Nellymoser. patch by Alexander Chemeris, ipse.ffmpeg gmail.com
author diego
date Mon, 11 May 2009 19:21:49 +0000
parents 4cb7c65fc775
children 67a20f0eb42c
comparison
equal deleted inserted replaced
9626:bd3e11b60ccd 9627:b10d954527a2
133 if (avctx->channels != 1) { 133 if (avctx->channels != 1) {
134 av_log(avctx, AV_LOG_ERROR, "Nellymoser supports only 1 channel\n"); 134 av_log(avctx, AV_LOG_ERROR, "Nellymoser supports only 1 channel\n");
135 return -1; 135 return -1;
136 } 136 }
137 137
138 if (avctx->sample_rate != 8000 && avctx->sample_rate != 11025 && 138 if (avctx->sample_rate != 8000 && avctx->sample_rate != 16000 &&
139 avctx->sample_rate != 11025 &&
139 avctx->sample_rate != 22050 && avctx->sample_rate != 44100 && 140 avctx->sample_rate != 22050 && avctx->sample_rate != 44100 &&
140 avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL) { 141 avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
141 av_log(avctx, AV_LOG_ERROR, "Nellymoser works only with 8000, 11025, 22050 and 44100 sample rate\n"); 142 av_log(avctx, AV_LOG_ERROR, "Nellymoser works only with 8000, 16000, 11025, 22050 and 44100 sample rate\n");
142 return -1; 143 return -1;
143 } 144 }
144 145
145 avctx->frame_size = NELLY_SAMPLES; 146 avctx->frame_size = NELLY_SAMPLES;
146 s->avctx = avctx; 147 s->avctx = avctx;