[FFmpeg-cvslog] testsrc seconds display is out-by-one frame

Mark Himsley git at videolan.org
Tue Oct 25 18:35:01 CEST 2011


ffmpeg | branch: master | Mark Himsley <mark at mdsh.com> | Tue Oct 25 16:41:37 2011 +0100| [1ca1336067aaad80f223477b763b620ac5f61699] | committer: Michael Niedermayer

testsrc seconds display is out-by-one frame

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ca1336067aaad80f223477b763b620ac5f61699
---

 libavfilter/vsrc_testsrc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 790453a..33d2a01 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -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);



More information about the ffmpeg-cvslog mailing list