diff mbox series

[FFmpeg-devel,08/39] avfilter/af_sidechaincompress: Deduplicate AVClasses

Message ID AM7PR03MB6660D4A522612902CA050D168FD79@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 974e8262c9222426b0e5f243db48edec0fc9fdc0
Headers show
Series [FFmpeg-devel,01/39] avfilter/vf_maskedminmax: Simplify init | expand

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_sidechaincompress.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c
index c964e0d27c..48d450fd50 100644
--- a/libavfilter/af_sidechaincompress.c
+++ b/libavfilter/af_sidechaincompress.c
@@ -93,8 +93,9 @@  static const AVOption options[] = {
     { NULL }
 };
 
-#define sidechaincompress_options options
-AVFILTER_DEFINE_CLASS(sidechaincompress);
+AVFILTER_DEFINE_CLASS_EXT(sidechaincompress_acompressor,
+                          "acompressor/sidechaincompress",
+                          options);
 
 // A fake infinity value (because real infinity may break some hosts)
 #define FAKE_INFINITY (65536.0 * 65536.0)
@@ -384,8 +385,8 @@  static const AVFilterPad sidechaincompress_outputs[] = {
 const AVFilter ff_af_sidechaincompress = {
     .name           = "sidechaincompress",
     .description    = NULL_IF_CONFIG_SMALL("Sidechain compressor."),
+    .priv_class     = &sidechaincompress_acompressor_class,
     .priv_size      = sizeof(SidechainCompressContext),
-    .priv_class     = &sidechaincompress_class,
     .query_formats  = query_formats,
     .activate       = activate,
     .uninit         = uninit,
@@ -443,9 +444,6 @@  static int acompressor_query_formats(AVFilterContext *ctx)
     return ff_set_common_all_samplerates(ctx);
 }
 
-#define acompressor_options options
-AVFILTER_DEFINE_CLASS(acompressor);
-
 static const AVFilterPad acompressor_inputs[] = {
     {
         .name           = "default",
@@ -465,8 +463,8 @@  static const AVFilterPad acompressor_outputs[] = {
 const AVFilter ff_af_acompressor = {
     .name           = "acompressor",
     .description    = NULL_IF_CONFIG_SMALL("Audio compressor."),
+    .priv_class     = &sidechaincompress_acompressor_class,
     .priv_size      = sizeof(SidechainCompressContext),
-    .priv_class     = &acompressor_class,
     .query_formats  = acompressor_query_formats,
     FILTER_INPUTS(acompressor_inputs),
     FILTER_OUTPUTS(acompressor_outputs),