[FFmpeg-cvslog] add the start_number offset to var_values[VAR_N] directly, instead of adding it in func_frame_num

Mark Visser git at videolan.org
Wed Jun 19 01:37:58 CEST 2013


ffmpeg | branch: master | Mark Visser <mjmvisser at gmail.com> | Tue Jun 18 17:38:17 2013 -0400| [2090abcc436df92969634577c91ea1d1143d4533] | committer: Mark Visser

add the start_number offset to var_values[VAR_N] directly, instead of adding it in func_frame_num

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

 libavfilter/vf_drawtext.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index fcdf53a..7cafafe 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -616,7 +616,7 @@ static int func_frame_num(AVFilterContext *ctx, AVBPrint *bp,
 {
     DrawTextContext *s = ctx->priv;
 
-    av_bprintf(bp, "%d", (int)s->var_values[VAR_N]+s->start_number);
+    av_bprintf(bp, "%d", (int)s->var_values[VAR_N]);
     return 0;
 }
 
@@ -980,7 +980,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
         if ((ret = load_textfile(ctx)) < 0)
             return ret;
 
-    s->var_values[VAR_N] = inlink->frame_count;
+    s->var_values[VAR_N] = inlink->frame_count+s->start_number;
     s->var_values[VAR_T] = frame->pts == AV_NOPTS_VALUE ?
         NAN : frame->pts * av_q2d(inlink->time_base);
 



More information about the ffmpeg-cvslog mailing list