diff mbox series

[FFmpeg-devel,10/39] avfilter/f_drawgraph: Deduplicate AVClasses

Message ID AM7PR03MB6660B8BAD3A8E6DB9F5140A08FD79@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 9ceec2869a6ef58d6cab2359a6149b6163b3d5c7
Headers show
Series [FFmpeg-devel,01/39] avfilter/vf_maskedminmax: Simplify init
Related show

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_drawgraph.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/f_drawgraph.c b/libavfilter/f_drawgraph.c
index a9b47483ad..9996eb3b0e 100644
--- a/libavfilter/f_drawgraph.c
+++ b/libavfilter/f_drawgraph.c
@@ -84,6 +84,8 @@  static const AVOption drawgraph_options[] = {
     { NULL }
 };
 
+AVFILTER_DEFINE_CLASS_EXT(drawgraph, "(a)drawgraph", drawgraph_options);
+
 static const char *const var_names[] = {   "MAX",   "MIN",   "VAL", NULL };
 enum                                   { VAR_MAX, VAR_MIN, VAR_VAL, VAR_VARS_NB };
 
@@ -450,8 +452,6 @@  static av_cold void uninit(AVFilterContext *ctx)
 
 #if CONFIG_DRAWGRAPH_FILTER
 
-AVFILTER_DEFINE_CLASS(drawgraph);
-
 static const AVFilterPad drawgraph_inputs[] = {
     {
         .name         = "default",
@@ -485,9 +485,6 @@  const AVFilter ff_vf_drawgraph = {
 
 #if CONFIG_ADRAWGRAPH_FILTER
 
-#define adrawgraph_options drawgraph_options
-AVFILTER_DEFINE_CLASS(adrawgraph);
-
 static const AVFilterPad adrawgraph_inputs[] = {
     {
         .name         = "default",
@@ -508,8 +505,8 @@  static const AVFilterPad adrawgraph_outputs[] = {
 const AVFilter ff_avf_adrawgraph = {
     .name          = "adrawgraph",
     .description   = NULL_IF_CONFIG_SMALL("Draw a graph using input audio metadata."),
+    .priv_class    = &drawgraph_class,
     .priv_size     = sizeof(DrawGraphContext),
-    .priv_class    = &adrawgraph_class,
     .query_formats = query_formats,
     .init          = init,
     .uninit        = uninit,