summaryrefslogtreecommitdiff
path: root/libavdevice/vfwcap.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2008-03-08 23:06:33 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2008-03-08 23:06:33 +0000
commitd76c3e077ed9cb0210cd16ec56c8e00794689c71 (patch)
treeffeadf600e7568409d14ef2e28ad7fee04d5a1c8 /libavdevice/vfwcap.c
parentfd9da08703740f69e61c82383c2b3dbf29379402 (diff)
Correctly handle case where buffer is 100% full
Originally committed as revision 12389 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice/vfwcap.c')
-rw-r--r--libavdevice/vfwcap.c2
1 files changed, 1 insertions, 1 deletions
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;