diff mbox series

[FFmpeg-devel,14/39] avfilter/f_sendcmd: Deduplicate AVClasses

Message ID AM7PR03MB6660EBAD0D14E34A9951065D8FD79@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit cf724beade0f83d2d00b83248521e50650264622
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/f_sendcmd.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c
index 99d8ca939c..f71d211eb4 100644
--- a/libavfilter/f_sendcmd.c
+++ b/libavfilter/f_sendcmd.c
@@ -572,10 +572,9 @@  end:
     return AVERROR(ENOSYS);
 }
 
-#if CONFIG_SENDCMD_FILTER
+AVFILTER_DEFINE_CLASS_EXT(sendcmd, "(a)sendcmd", options);
 
-#define sendcmd_options options
-AVFILTER_DEFINE_CLASS(sendcmd);
+#if CONFIG_SENDCMD_FILTER
 
 static const AVFilterPad sendcmd_inputs[] = {
     {
@@ -607,9 +606,6 @@  const AVFilter ff_vf_sendcmd = {
 
 #if CONFIG_ASENDCMD_FILTER
 
-#define asendcmd_options options
-AVFILTER_DEFINE_CLASS(asendcmd);
-
 static const AVFilterPad asendcmd_inputs[] = {
     {
         .name         = "default",
@@ -628,12 +624,12 @@  static const AVFilterPad asendcmd_outputs[] = {
 const AVFilter ff_af_asendcmd = {
     .name        = "asendcmd",
     .description = NULL_IF_CONFIG_SMALL("Send commands to filters."),
+    .priv_class  = &sendcmd_class,
     .init        = init,
     .uninit      = uninit,
     .priv_size   = sizeof(SendCmdContext),
     FILTER_INPUTS(asendcmd_inputs),
     FILTER_OUTPUTS(asendcmd_outputs),
-    .priv_class  = &asendcmd_class,
 };
 
 #endif