aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_agate.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-10 20:45:36 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-19 03:58:00 +0200
commitbc86e1b6027f5bf9fee7b46542f0d51923925a43 (patch)
tree7ee66e7e264948d498ca7bee538f32eb3da8d03b /libavfilter/af_agate.c
parentcef920853fece79c306c4d1c4873a22013609292 (diff)
downloadffmpeg-bc86e1b6027f5bf9fee7b46542f0d51923925a43.tar.gz
avfilter/af_agate: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/af_agate.c')
-rw-r--r--libavfilter/af_agate.c12
1 files 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,