Skip to content
Snippets Groups Projects
Commit 5a3e9f2c authored by Kenan Gillet's avatar Kenan Gillet Committed by Reynaldo H. Verdejo Pinochet
Browse files

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
parent 5fecfb7d
No related branches found
No related tags found
No related merge requests found
...@@ -71,6 +71,7 @@ typedef struct ...@@ -71,6 +71,7 @@ typedef struct
float pitch_gain[4]; float pitch_gain[4];
uint8_t pitch_lag[4]; uint8_t pitch_lag[4];
uint16_t first16bits; uint16_t first16bits;
uint8_t warned_buf_mismatch_bitrate;
} QCELPContext; } QCELPContext;
/** /**
...@@ -636,8 +637,13 @@ static int determine_bitrate(AVCodecContext *avctx, const int buf_size, ...@@ -636,8 +637,13 @@ static int determine_bitrate(AVCodecContext *avctx, const int buf_size,
{ {
if(bitrate > **buf) if(bitrate > **buf)
{ {
QCELPContext *q = avctx->priv_data;
if (!q->warned_buf_mismatch_bitrate)
{
av_log(avctx, AV_LOG_WARNING, av_log(avctx, AV_LOG_WARNING,
"Claimed bitrate and buffer size mismatch.\n"); "Claimed bitrate and buffer size mismatch.\n");
q->warned_buf_mismatch_bitrate = 1;
}
bitrate = **buf; bitrate = **buf;
}else if(bitrate < **buf) }else if(bitrate < **buf)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment