diff mbox series

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

Message ID PR3PR03MB6665435F23783F9DD4BD4E198FAA9@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 628b30e8866bfcc547e5ed873e3630d5705f7b8c
Headers show
Series [FFmpeg-devel,001/218] avfilter/f_reverse: Don't use redundant query_formats function
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 30, 2021, 1:39 p.m. UTC
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@outlook.com>
---
 libavfilter/vf_fieldorder.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

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)