aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-18 22:32:39 +0100
committerAnton Khirnov <anton@khirnov.net>2013-05-17 07:42:55 +0200
commit7727be79d1eeb24501459c49329ccad90161f459 (patch)
tree7e3ef8ba5d627e3a2a158de12adcb44acb7e3883
parentd371c3c2e2830d9783465ecfe1ab7d93351083b7 (diff)
downloadffmpeg-7727be79d1eeb24501459c49329ccad90161f459.tar.gz
vf_fps: move initializing pts from config_props to init.
It should not be reinitialized if the link properties change.
-rw-r--r--libavfilter/vf_fps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index eb201fa898..7f5175248c 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -77,6 +77,8 @@ static av_cold int init(AVFilterContext *ctx)
if (!(s->fifo = av_fifo_alloc(2*sizeof(AVFrame*))))
return AVERROR(ENOMEM);
+ s->pts = AV_NOPTS_VALUE;
+
av_log(ctx, AV_LOG_VERBOSE, "fps=%d/%d\n", s->framerate.num, s->framerate.den);
return 0;
}
@@ -110,7 +112,6 @@ static int config_props(AVFilterLink* link)
link->time_base = (AVRational){ s->framerate.den, s->framerate.num };
link->w = link->src->inputs[0]->w;
link->h = link->src->inputs[0]->h;
- s->pts = AV_NOPTS_VALUE;
return 0;
}