[FFmpeg-cvslog] r16046 - trunk/libavcodec/qcelpdec.c

reynaldo subversion
Thu Dec 11 01:11:02 CET 2008


Author: reynaldo
Date: Thu Dec 11 01:11:02 2008
New Revision: 16046

Log:
Avoid the 'Claimed bitrate and buffer size mismatch' warning storm.
- Patch by Kenan Gillet


Modified:
   trunk/libavcodec/qcelpdec.c

Modified: trunk/libavcodec/qcelpdec.c
==============================================================================
--- trunk/libavcodec/qcelpdec.c	(original)
+++ trunk/libavcodec/qcelpdec.c	Thu Dec 11 01:11:02 2008
@@ -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(AVCodecCont
     {
         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)
         {




More information about the ffmpeg-cvslog mailing list