diff mbox series

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

Message ID AM7PR03MB66601875F3949882434B85FA8FFC9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 4049b34aca8fba718dc8a220c7765e5131d82a1b
Headers show
Series [FFmpeg-devel,01/10] fftools/cmdutils: Use avfilter_pad_count() for AVFilter's number of pads | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 15, 2021, 9:55 a.m. UTC
by using ff_set_common_formats().

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

Comments

Paul B Mahol Aug. 15, 2021, 9:59 a.m. UTC | #1
LGTM
diff mbox series

Patch

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;