]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Correctly handle case where buffer is 100% full
authorramiro <ramiro@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 8 Mar 2008 23:06:33 +0000 (23:06 +0000)
committerramiro <ramiro@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 8 Mar 2008 23:06:33 +0000 (23:06 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12389 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavdevice/vfwcap.c

index aa3a788d4269c4fdcc4949cc7920ce91fe6f6869..26273be75f4d457c54913ce6ee58a6ac88415695 100644 (file)
@@ -189,7 +189,7 @@ static int shall_we_drop(struct vfw_ctx *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;