From b7e350af3e8eaeb4825646a4bcef7fa051bd0a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Tue, 4 May 2021 21:04:59 +0200 Subject: [PATCH] avfilter/[vf_nnedi, vf_estdif]: check interlaced flag on correct frame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes regression in vf_nnedi after 24dc6d386c6f7edb8f6945319f53a7f0b1642bb8 and vf_estdif while at it. Signed-off-by: Kacper Michajłow --- libavfilter/vf_estdif.c | 2 +- libavfilter/vf_nnedi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_estdif.c b/libavfilter/vf_estdif.c index 192837ab0f..863d453775 100644 --- a/libavfilter/vf_estdif.c +++ b/libavfilter/vf_estdif.c @@ -498,7 +498,7 @@ static int config_input(AVFilterLink *inlink) return 0; } - if ((s->deint && !in->interlaced_frame) || ctx->is_disabled) { + if ((s->deint && !s->prev->interlaced_frame) || ctx->is_disabled) { s->prev->pts *= 2; ret = ff_filter_frame(ctx->outputs[0], s->prev); s->prev = in; diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c index 95b736afc1..dd476aeb04 100644 --- a/libavfilter/vf_nnedi.c +++ b/libavfilter/vf_nnedi.c @@ -694,7 +694,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) return 0; } - if ((s->deint && !in->interlaced_frame) || ctx->is_disabled) { + if ((s->deint && !s->prev->interlaced_frame) || ctx->is_disabled) { s->prev->pts *= 2; ret = ff_filter_frame(ctx->outputs[0], s->prev); s->prev = in;