Commit 2a3b637b authored by ramiro's avatar ramiro

Correctly handle case where buffer is 100% full

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12389 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9957f57e
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment