diff mbox series

[FFmpeg-devel,01/39] avfilter/vf_maskedminmax: Simplify init

Message ID AM7PR03MB6660AA1707320F404A82158B8FD79@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 142f41a0600317654d54ba2cdca9754a522c8819
Headers show
Series [FFmpeg-devel,01/39] avfilter/vf_maskedminmax: Simplify init
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. 11, 2021, 11:16 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_maskedminmax.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Paul B Mahol Sept. 13, 2021, 11:52 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavfilter/vf_maskedminmax.c b/libavfilter/vf_maskedminmax.c
index afac145e2a..f0c499a0d5 100644
--- a/libavfilter/vf_maskedminmax.c
+++ b/libavfilter/vf_maskedminmax.c
@@ -54,11 +54,11 @@  static const AVOption maskedminmax_options[] = {
     { NULL }
 };
 
-static av_cold int init(AVFilterContext *ctx)
+static av_cold int maskedmin_init(AVFilterContext *ctx)
 {
     MaskedMinMaxContext *s = ctx->priv;
 
-    s->maskedmin = !strcmp(ctx->filter->name, "maskedmin");
+    s->maskedmin = 1;
 
     return 0;
 }
@@ -331,7 +331,7 @@  const AVFilter ff_vf_maskedmin = {
     .description   = NULL_IF_CONFIG_SMALL("Apply filtering with minimum difference of two streams."),
     .priv_class    = &maskedmin_class,
     .priv_size     = sizeof(MaskedMinMaxContext),
-    .init          = init,
+    .init          = maskedmin_init,
     .uninit        = uninit,
     .activate      = activate,
     .query_formats = query_formats,
@@ -349,7 +349,6 @@  const AVFilter ff_vf_maskedmax = {
     .description   = NULL_IF_CONFIG_SMALL("Apply filtering with maximum difference of two streams."),
     .priv_class    = &maskedmax_class,
     .priv_size     = sizeof(MaskedMinMaxContext),
-    .init          = init,
     .uninit        = uninit,
     .activate      = activate,
     .query_formats = query_formats,