[FFmpeg-cvslog] r12389 - trunk/libavdevice/vfwcap.c

ramiro subversion
Sun Mar 9 00:06:33 CET 2008


Author: ramiro
Date: Sun Mar  9 00:06:33 2008
New Revision: 12389

Log:
Correctly handle case where buffer is 100% full

Modified:
   trunk/libavdevice/vfwcap.c

Modified: trunk/libavdevice/vfwcap.c
==============================================================================
--- trunk/libavdevice/vfwcap.c	(original)
+++ trunk/libavdevice/vfwcap.c	Sun Mar  9 00:06:33 2008
@@ -189,7 +189,7 @@ static int shall_we_drop(struct vfw_ctx 
     const int ndropscores = sizeof(dropscore)/sizeof(dropscore[0]);
     unsigned int buffer_fullness = (ctx->curbufsize*100)/s->max_picture_buffer;
 
-    if(dropscore[++ctx->frame_num%ndropscores] < buffer_fullness) {
+    if(dropscore[++ctx->frame_num%ndropscores] <= buffer_fullness) {
         av_log(ctx->s, AV_LOG_ERROR,
               "real-time buffer %d%% full! frame dropped!\n", buffer_fullness);
         return 1;




More information about the ffmpeg-cvslog mailing list