[FFmpeg-cvslog] avfilter/vf_w3fdif: do not output extra frame at start with deint=interlaced

Paul B Mahol git at videolan.org
Mon Oct 18 10:31:24 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Oct 18 09:26:42 2021 +0200| [bbbf95848b3480ca7b8d2ede51c338cde7cb7ced] | committer: Paul B Mahol

avfilter/vf_w3fdif: do not output extra frame at start with deint=interlaced

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbbf95848b3480ca7b8d2ede51c338cde7cb7ced
---

 libavfilter/vf_w3fdif.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index c2ea76dfa3..41a45ea06c 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -526,6 +526,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
             return AVERROR(ENOMEM);
     }
 
+    if (!s->prev)
+        return 0;
+
     if ((s->deint && !s->cur->interlaced_frame) || ctx->is_disabled) {
         AVFrame *out = av_frame_clone(s->cur);
         if (!out)
@@ -537,9 +540,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
         return ff_filter_frame(ctx->outputs[0], out);
     }
 
-    if (!s->prev)
-        return 0;
-
     ret = filter(ctx, 0);
     if (ret < 0 || s->mode == 0)
         return ret;



More information about the ffmpeg-cvslog mailing list