latest libavc svn requires at least this value for bit_rate_tolerance, not using...
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 24 May 2008 02:19:46 +0000 (02:19 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 24 May 2008 02:19:46 +0000 (02:19 +0000)
Originally committed as revision 13271 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index 986bd69..a32e11a 100644 (file)
@@ -3584,7 +3584,8 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
         }
         /* Bitrate tolerance is less for streaming */
         if (av->bit_rate_tolerance == 0)
-            av->bit_rate_tolerance = av->bit_rate / 4;
+            av->bit_rate_tolerance = FFMAX(av->bit_rate / 4,
+                      (int64_t)av->bit_rate*av->time_base.num/av->time_base.den);
         if (av->qmin == 0)
             av->qmin = 3;
         if (av->qmax == 0)