Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-04-15 19:42:04 +0400
committerClément Bœsch <ubitux@gmail.com>2013-04-23 03:02:27 +0400
commitb8a5c76131944b4cc17c6db609288d0000d56a43 (patch)
tree2aeabcf34ac5d3ada79c9ae6168dba392ab393dd /libavfilter/vf_crop.c
parentf4596e8bb6f74599b8258c87036c237c5da4b209 (diff)
lavfi: add frame counter into AVFilterLink and use it in filters.
Diffstat (limited to 'libavfilter/vf_crop.c')
-rw-r--r--libavfilter/vf_crop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 11ed375c48..5d7dd2cc88 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -259,6 +259,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
frame->width = crop->w;
frame->height = crop->h;
+ crop->var_values[VAR_N] = link->frame_count;
crop->var_values[VAR_T] = frame->pts == AV_NOPTS_VALUE ?
NAN : frame->pts * av_q2d(link->time_base);
crop->var_values[VAR_POS] = av_frame_get_pkt_pos(frame) == -1 ?
@@ -299,8 +300,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
frame->data[3] += crop->x * crop->max_step[3];
}
- crop->var_values[VAR_N] += 1.0;
-
return ff_filter_frame(link->dst->outputs[0], frame);
}