From 9f9b2ab1b1efce851394e8ff120fb150fa0efba1 Mon Sep 17 00:00:00 2001 From: Mark Himsley Date: Tue, 25 Oct 2011 23:34:45 +0200 Subject: [PATCH] vsrc_testsrc: fix off-by-one logic when detecting the EOF time in request_frame() Signed-off-by: Stefano Sabatini --- libavfilter/vsrc_testsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 33d2a0196a..148fb5b295 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -127,7 +127,7 @@ static int request_frame(AVFilterLink *outlink) TestSourceContext *test = outlink->src->priv; AVFilterBufferRef *picref; - if (test->max_pts >= 0 && test->pts > test->max_pts) + if (test->max_pts >= 0 && test->pts >= test->max_pts) return AVERROR_EOF; picref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, test->w, test->h);