testsrc seconds display is out-by-one frame
authorMark Himsley <mark@mdsh.com>
Tue, 25 Oct 2011 15:41:37 +0000 (16:41 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 25 Oct 2011 16:24:25 +0000 (18:24 +0200)
Without this patch each displayed second is incremented 1 frame early,
second 0 is only 24 frames long where as every other second is 25 frames
long.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vsrc_testsrc.c

index 790453a..33d2a01 100644 (file)
@@ -137,8 +137,8 @@ static int request_frame(AVFilterLink *outlink)
     picref->video->interlaced = 0;
     picref->video->pict_type = AV_PICTURE_TYPE_I;
     picref->video->sample_aspect_ratio = test->sar;
-    test->nb_frame++;
     test->fill_picture_fn(outlink->src, picref);
+    test->nb_frame++;
 
     avfilter_start_frame(outlink, avfilter_ref_buffer(picref, ~0));
     avfilter_draw_slice(outlink, 0, picref->video->h, 1);