vf_fps: move initializing pts from config_props to init.

It should not be reinitialized if the link properties change.
This commit is contained in:
Anton Khirnov 2013-03-18 22:32:39 +01:00
parent d371c3c2e2
commit 7727be79d1
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}