[FFmpeg-soc] [soc]: r1209 - qcelp/qcelpdec.c
reynaldo
subversion at mplayerhq.hu
Mon Aug 27 21:47:10 CEST 2007
Author: reynaldo
Date: Mon Aug 27 21:47:10 2007
New Revision: 1209
Log:
Adds two informative warnings in case of failed samplerate/channels
sanity checks.
Modified:
qcelp/qcelpdec.c
Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c (original)
+++ qcelp/qcelpdec.c Mon Aug 27 21:47:10 2007
@@ -73,6 +73,15 @@ static int qcelp_decode_init(AVCodecCont
QCELPContext *q = (QCELPContext *) avctx->priv_data;
int i;
+ if(avctx->sample_rate != 8000)
+ av_log(avctx, AV_LOG_WARNING,
+ "Unsupported samplerate %d, resampling.", avctx->sample_rate);
+
+ if(avctx->channels != 1)
+ av_log(avctx, AV_LOG_WARNING,
+ "QCELP doesn't allow %d channels. Trying mono.\n",
+ avctx->channels);
+
avctx->sample_rate = 8000;
avctx->channels = 1;
More information about the FFmpeg-soc
mailing list