diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-10 21:13:46 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-19 04:05:55 +0200 |
commit | 974e8262c9222426b0e5f243db48edec0fc9fdc0 (patch) | |
tree | 62cfd2c8187c0ce4be2a15143441114c94f95180 | |
parent | 4ab80ac17e4673dd4eb172c9aacea3a37b1e99cf (diff) | |
download | ffmpeg-974e8262c9222426b0e5f243db48edec0fc9fdc0.tar.gz |
avfilter/af_sidechaincompress: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavfilter/af_sidechaincompress.c | 12 |
1 files changed, 5 insertions, 7 deletions
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), |