diff mbox series

[FFmpeg-devel,03/39] avfilter/af_agate: Deduplicate AVClasses

Message ID AM7PR03MB666072DBE14A3F609793A04B8FD79@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit bc86e1b6027f5bf9fee7b46542f0d51923925a43
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:40 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/af_agate.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c
index 0dc28ac080..284880833a 100644
--- a/libavfilter/af_agate.c
+++ b/libavfilter/af_agate.c
@@ -86,6 +86,8 @@  static const AVOption options[] = {
     { NULL }
 };
 
+AVFILTER_DEFINE_CLASS_EXT(agate_sidechaingate, "agate/sidechaingate", options);
+
 static int agate_config_input(AVFilterLink *inlink)
 {
     AVFilterContext *ctx = inlink->dst;
@@ -183,9 +185,6 @@  static void gate(AudioGateContext *s,
 
 #if CONFIG_AGATE_FILTER
 
-#define agate_options options
-AVFILTER_DEFINE_CLASS(agate);
-
 static int query_formats(AVFilterContext *ctx)
 {
     AVFilterFormats *formats = NULL;
@@ -252,9 +251,9 @@  static const AVFilterPad outputs[] = {
 const AVFilter ff_af_agate = {
     .name           = "agate",
     .description    = NULL_IF_CONFIG_SMALL("Audio gate."),
+    .priv_class     = &agate_sidechaingate_class,
     .query_formats  = query_formats,
     .priv_size      = sizeof(AudioGateContext),
-    .priv_class     = &agate_class,
     FILTER_INPUTS(inputs),
     FILTER_OUTPUTS(outputs),
     .process_command = ff_filter_process_command,
@@ -265,9 +264,6 @@  const AVFilter ff_af_agate = {
 
 #if CONFIG_SIDECHAINGATE_FILTER
 
-#define sidechaingate_options options
-AVFILTER_DEFINE_CLASS(sidechaingate);
-
 static int activate(AVFilterContext *ctx)
 {
     AudioGateContext *s = ctx->priv;
@@ -424,8 +420,8 @@  static const AVFilterPad sidechaingate_outputs[] = {
 const AVFilter ff_af_sidechaingate = {
     .name           = "sidechaingate",
     .description    = NULL_IF_CONFIG_SMALL("Audio sidechain gate."),
+    .priv_class     = &agate_sidechaingate_class,
     .priv_size      = sizeof(AudioGateContext),
-    .priv_class     = &sidechaingate_class,
     .query_formats  = scquery_formats,
     .activate       = activate,
     .uninit         = uninit,