summaryrefslogtreecommitdiff
path: root/libavcodec/qcelpdec.c
diff options
context:
space:
mode:
authorKenan Gillet <kenan.gillet@gmail.com>2008-12-11 00:11:02 +0000
committerReynaldo H. Verdejo Pinochet <reynaldo@opendot.cl>2008-12-11 00:11:02 +0000
commit5a3e9f2c80e3a1c3b807201aa8800da25f132b9b (patch)
tree0861641a31df814c29c80dc142ed8a1cda24f4cd /libavcodec/qcelpdec.c
parent5fecfb7d58a12baf326e99f2d071060f2638d93c (diff)
Avoid the 'Claimed bitrate and buffer size mismatch' warning storm.
- Patch by Kenan Gillet Originally committed as revision 16046 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/qcelpdec.c')
-rw-r--r--libavcodec/qcelpdec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
index ccfba26a88..098b8f6f69 100644
--- a/libavcodec/qcelpdec.c
+++ b/libavcodec/qcelpdec.c
@@ -71,6 +71,7 @@ typedef struct
float pitch_gain[4];
uint8_t pitch_lag[4];
uint16_t first16bits;
+ uint8_t warned_buf_mismatch_bitrate;
} QCELPContext;
/**
@@ -636,8 +637,13 @@ static int determine_bitrate(AVCodecContext *avctx, const int buf_size,
{
if(bitrate > **buf)
{
+ QCELPContext *q = avctx->priv_data;
+ if (!q->warned_buf_mismatch_bitrate)
+ {
av_log(avctx, AV_LOG_WARNING,
"Claimed bitrate and buffer size mismatch.\n");
+ q->warned_buf_mismatch_bitrate = 1;
+ }
bitrate = **buf;
}else if(bitrate < **buf)
{