diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-06-03 14:49:57 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-06-03 14:57:25 +0200 |
commit | 983288538669f19df3b6f1e19b00488a5d2ec8bd (patch) | |
tree | f18cb8e5da863f2663c1c01ef0c434b160634cbf | |
parent | 49eda27c6e7ad699d8f09c8ba60b9507946d1b1c (diff) | |
download | ffmpeg-983288538669f19df3b6f1e19b00488a5d2ec8bd.tar.gz |
avfilter/vf_zoompan: do not increase VAR_IN twice, also count from 0
Fixes #7242.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavfilter/vf_zoompan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c index 0635171b57..dea10d5137 100644 --- a/libavfilter/vf_zoompan.c +++ b/libavfilter/vf_zoompan.c @@ -167,7 +167,7 @@ static int output_single_frame(AVFilterContext *ctx, AVFrame *in, double *var_va var_values[VAR_PDURATION] = s->prev_nb_frames; var_values[VAR_TIME] = pts * av_q2d(outlink->time_base); var_values[VAR_FRAME] = i; - var_values[VAR_ON] = outlink->frame_count_in + 1; + var_values[VAR_ON] = outlink->frame_count_in; *zoom = av_expr_eval(s->zoom_expr, var_values, NULL); @@ -274,8 +274,8 @@ static int activate(AVFilterContext *ctx) s->var_values[VAR_IN_H] = s->var_values[VAR_IH] = s->in->height; s->var_values[VAR_OUT_W] = s->var_values[VAR_OW] = s->w; s->var_values[VAR_OUT_H] = s->var_values[VAR_OH] = s->h; - s->var_values[VAR_IN] = inlink->frame_count_out + 1; - s->var_values[VAR_ON] = outlink->frame_count_in + 1; + s->var_values[VAR_IN] = inlink->frame_count_out - 1; + s->var_values[VAR_ON] = outlink->frame_count_in; s->var_values[VAR_PX] = s->x; s->var_values[VAR_PY] = s->y; s->var_values[VAR_X] = 0; |