1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Correctly handle case where buffer is 100% full

Originally committed as revision 12389 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Ramiro Polla 2008-03-08 23:06:33 +00:00
parent fd9da08703
commit d76c3e077e

View File

@ -189,7 +189,7 @@ static int shall_we_drop(struct vfw_ctx *ctx)
const int ndropscores = sizeof(dropscore)/sizeof(dropscore[0]); const int ndropscores = sizeof(dropscore)/sizeof(dropscore[0]);
unsigned int buffer_fullness = (ctx->curbufsize*100)/s->max_picture_buffer; 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, av_log(ctx->s, AV_LOG_ERROR,
"real-time buffer %d%% full! frame dropped!\n", buffer_fullness); "real-time buffer %d%% full! frame dropped!\n", buffer_fullness);
return 1; return 1;