[FFmpeg-cvslog] avfilter/af_agate: Deduplicate AVClasses

Andreas Rheinhardt git at videolan.org
Sun Sep 19 06:13:25 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Sep 10 20:45:36 2021 +0200| [bc86e1b6027f5bf9fee7b46542f0d51923925a43] | committer: Andreas Rheinhardt

avfilter/af_agate: Deduplicate AVClasses

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc86e1b6027f5bf9fee7b46542f0d51923925a43
---

 libavfilter/af_agate.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

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,



More information about the ffmpeg-cvslog mailing list