[FFmpeg-devel] [PATCH 07/10] avfilter/vf_fieldorder: Simplify setting common pixel formats

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Aug 15 12:55:35 EEST 2021


by using ff_set_common_formats().

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

diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index c045d1634d..d34119c920 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -58,9 +58,7 @@ static int query_formats(AVFilterContext *ctx)
                 (ret = ff_add_format(&formats, pix_fmt)) < 0)
                 return ret;
         }
-        if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0 ||
-            (ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
-            return ret;
+        return ff_set_common_formats(ctx, formats);
     }
 
     return 0;
-- 
2.30.2



More information about the ffmpeg-devel mailing list