diff mbox series

[FFmpeg-devel,16/39] avfilter/f_zmq: Deduplicate AVClasses

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

Patch

diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c
index 5de22e2fbe..3bd195f0b2 100644
--- a/libavfilter/f_zmq.c
+++ b/libavfilter/f_zmq.c
@@ -203,10 +203,9 @@  static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
     return ff_filter_frame(ctx->outputs[0], ref);
 }
 
-#if CONFIG_ZMQ_FILTER
+AVFILTER_DEFINE_CLASS_EXT(zmq, "(a)zmq", options);
 
-#define zmq_options options
-AVFILTER_DEFINE_CLASS(zmq);
+#if CONFIG_ZMQ_FILTER
 
 static const AVFilterPad zmq_inputs[] = {
     {
@@ -238,9 +237,6 @@  const AVFilter ff_vf_zmq = {
 
 #if CONFIG_AZMQ_FILTER
 
-#define azmq_options options
-AVFILTER_DEFINE_CLASS(azmq);
-
 static const AVFilterPad azmq_inputs[] = {
     {
         .name         = "default",
@@ -259,12 +255,12 @@  static const AVFilterPad azmq_outputs[] = {
 const AVFilter ff_af_azmq = {
     .name        = "azmq",
     .description = NULL_IF_CONFIG_SMALL("Receive commands through ZMQ and broker them to filters."),
+    .priv_class  = &zmq_class,
     .init        = init,
     .uninit      = uninit,
     .priv_size   = sizeof(ZMQContext),
     FILTER_INPUTS(azmq_inputs),
     FILTER_OUTPUTS(azmq_outputs),
-    .priv_class  = &azmq_class,
 };
 
 #endif