[FFmpeg-cvslog] avfilter/vf_zoompan: do not increase VAR_IN twice, also count from 0
Paul B Mahol
git at videolan.org
Sun Jun 3 16:01:09 EEST 2018
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jun 3 14:49:57 2018 +0200| [983288538669f19df3b6f1e19b00488a5d2ec8bd] | committer: Paul B Mahol
avfilter/vf_zoompan: do not increase VAR_IN twice, also count from 0
Fixes #7242.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=983288538669f19df3b6f1e19b00488a5d2ec8bd
---
libavfilter/vf_zoompan.c | 6 +++---
1 file 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;
More information about the ffmpeg-cvslog
mailing list