Commit 2090abcc authored by Mark Visser's avatar Mark Visser

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

parent 0defc77e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment