[FFmpeg-devel] [PATCH 2/3] avfilter/vf_telecine: remove requirement on constant frame rate
Paul B Mahol
onemda at gmail.com
Fri Oct 11 13:40:42 CEST 2013
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavfilter/vf_telecine.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c
index b3fa9d5..9e87454e 100644
--- a/libavfilter/vf_telecine.c
+++ b/libavfilter/vf_telecine.c
@@ -146,14 +146,11 @@ static int config_output(AVFilterLink *outlink)
const AVFilterLink *inlink = ctx->inputs[0];
AVRational fps = inlink->frame_rate;
- if (!fps.num || !fps.den) {
- av_log(ctx, AV_LOG_ERROR, "The input needs a constant frame rate; "
- "current rate of %d/%d is invalid\n", fps.num, fps.den);
- return AVERROR(EINVAL);
+ if (fps.num && fps.den) {
+ fps = av_mul_q(fps, av_inv_q(s->pts));
+ av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n",
+ inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den);
}
- fps = av_mul_q(fps, av_inv_q(s->pts));
- av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n",
- inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den);
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
outlink->frame_rate = fps;
--
1.7.11.2
More information about the ffmpeg-devel
mailing list