From d76c3e077ed9cb0210cd16ec56c8e00794689c71 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Sat, 8 Mar 2008 23:06:33 +0000 Subject: Correctly handle case where buffer is 100% full Originally committed as revision 12389 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavdevice/vfwcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavdevice') diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c index aa3a788d42..26273be75f 100644 --- a/libavdevice/vfwcap.c +++ b/libavdevice/vfwcap.c @@ -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; -- cgit v1.2.3