summaryrefslogtreecommitdiff
path: root/libavfilter/vf_framestep.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-04-15 17:42:04 +0200
committerClément Bœsch <ubitux@gmail.com>2013-04-23 01:02:27 +0200
commitb8a5c76131944b4cc17c6db609288d0000d56a43 (patch)
tree2aeabcf34ac5d3ada79c9ae6168dba392ab393dd /libavfilter/vf_framestep.c
parentf4596e8bb6f74599b8258c87036c237c5da4b209 (diff)
downloadffmpeg-b8a5c76131944b4cc17c6db609288d0000d56a43.tar.gz
lavfi: add frame counter into AVFilterLink and use it in filters.
Diffstat (limited to 'libavfilter/vf_framestep.c')
-rw-r--r--libavfilter/vf_framestep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_framestep.c b/libavfilter/vf_framestep.c
index bd079cc32c..fb20411f56 100644
--- a/libavfilter/vf_framestep.c
+++ b/libavfilter/vf_framestep.c
@@ -30,7 +30,7 @@
typedef struct {
const AVClass *class;
- int frame_step, frame_count;
+ int frame_step;
} FrameStepContext;
#define OFFSET(x) offsetof(FrameStepContext, x)
@@ -64,7 +64,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
{
FrameStepContext *framestep = inlink->dst->priv;
- if (!(framestep->frame_count++ % framestep->frame_step)) {
+ if (!(inlink->frame_count % framestep->frame_step)) {
return ff_filter_frame(inlink->dst->outputs[0], ref);
} else {
av_frame_free(&ref);