From 4049b34aca8fba718dc8a220c7765e5131d82a1b Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 15 Aug 2021 08:01:17 +0200 Subject: [PATCH] avfilter/vf_fieldorder: Simplify setting common pixel formats by using ff_set_common_formats(). Reviewed-by: Paul B Mahol Signed-off-by: Andreas Rheinhardt --- 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 eefa417fb3..b521d36f52 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;