mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
add the start_number offset to var_values[VAR_N] directly, instead of adding it in func_frame_num
This commit is contained in:
parent
0defc77e9d
commit
2090abcc43
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue