diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-04-30 10:01:23 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-04-30 10:09:45 +0200 |
commit | 6018fa899f5fd06e3d565adaf229dbd5155d0f56 (patch) | |
tree | d3e969a66659a12bbe55a1961b3c0842459a3fd0 /libavfilter/vf_nnedi.c | |
parent | 55e0b041b370b09593e5d9f02ff56409d4ce3ad7 (diff) | |
download | ffmpeg-6018fa899f5fd06e3d565adaf229dbd5155d0f56.tar.gz |
avfilter/vf_nnedi: set frame_rate only when needed
Diffstat (limited to 'libavfilter/vf_nnedi.c')
-rw-r--r-- | libavfilter/vf_nnedi.c | 6 |
1 files 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; } |