diff options
author | Nicolas George <george@nsup.org> | 2016-08-30 16:28:41 +0300 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2016-11-13 12:41:16 +0300 |
commit | 183ce55b0de0a597b838d08bbac67f54c27ed42f (patch) | |
tree | ffd40aaf4f522d18b6b87b35e1b49f276cff913d /libavfilter/vf_zoompan.c | |
parent | 22aa649c13b452f11353958a51f073f5fbc3bcaa (diff) |
lavfi: split frame_count between input and output.
AVFilterLink.frame_count is supposed to count the number of frames
that were passed on the link, but with min_samples, that number is
not always the same for the source and destination filters.
With the addition of a FIFO on the link, the difference will become
more significant.
Split the variable in two: frame_count_in counts the number of
frames that entered the link, frame_count_out counts the number
of frames that were sent to the destination filter.
Diffstat (limited to 'libavfilter/vf_zoompan.c')
-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 7a71503168..136d6c83fd 100644 --- a/libavfilter/vf_zoompan.c +++ b/libavfilter/vf_zoompan.c @@ -149,7 +149,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 + 1; + var_values[VAR_ON] = outlink->frame_count_in + 1; if ((ret = av_expr_parse_and_eval(zoom, s->zoom_expr_str, var_names, var_values, NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0) @@ -235,8 +235,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) s->var_values[VAR_IN_H] = s->var_values[VAR_IH] = 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 + 1; - s->var_values[VAR_ON] = outlink->frame_count + 1; + s->var_values[VAR_IN] = inlink->frame_count_out + 1; + s->var_values[VAR_ON] = outlink->frame_count_in + 1; s->var_values[VAR_PX] = s->x; s->var_values[VAR_PY] = s->y; s->var_values[VAR_X] = 0; |