avfilter/vf_nnedi: set frame_rate only when needed
ffmpeg | branch: master | Paul B Mahol <onemda@gmail.com> | Sat Apr 30 10:01:23 2022 +0200| [6018fa899f5fd06e3d565adaf229dbd5155d0f56] | committer: Paul B Mahol avfilter/vf_nnedi: set frame_rate only when needed
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6018fa899f5fd06e3d...
libavfilter/vf_nnedi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c index cbe2110577..370f643678 100644 --- a/libavfilter/vf_nnedi.c +++ b/libavfilter/vf_nnedi.c @@ -166,13 +166,15 @@ AVFILTER_DEFINE_CLASS(nnedi); static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; + const NNEDIContext *const s = ctx->priv; outlink->time_base = av_mul_q(ctx->inputs[0]->time_base, (AVRational){1, 2}); outlink->w = ctx->inputs[0]->w; outlink->h = ctx->inputs[0]->h; - outlink->frame_rate = av_mul_q(ctx->inputs[0]->frame_rate, - (AVRational){2, 1}); + if (s->field == -2 || s->field > 1) + outlink->frame_rate = av_mul_q(ctx->inputs[0]->frame_rate, + (AVRational){2, 1}); return 0; }
participants (1)
-
Paul B Mahol