[FFmpeg-devel] [PATCH 002/218] avfilter/vf_fieldorder: Remove always-true check

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Sep 30 16:39:03 EEST 2021


A filter's formats.query callback is only called after all
the inputs and outputs have already been created.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavfilter/vf_fieldorder.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index d34119c920..40bfd6549f 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -46,7 +46,6 @@ static int query_formats(AVFilterContext *ctx)
 
     /** accept any input pixel format that is not hardware accelerated, not
      *  a bitstream format, and does not have vertically sub-sampled chroma */
-    if (ctx->inputs[0]) {
         const AVPixFmtDescriptor *desc = NULL;
         formats = NULL;
         while ((desc = av_pix_fmt_desc_next(desc))) {
@@ -59,9 +58,6 @@ static int query_formats(AVFilterContext *ctx)
                 return ret;
         }
         return ff_set_common_formats(ctx, formats);
-    }
-
-    return 0;
 }
 
 static int config_input(AVFilterLink *inlink)
-- 
2.30.2



More information about the ffmpeg-devel mailing list