summaryrefslogtreecommitdiff
path: root/libavfilter/framesync.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-11 19:29:34 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-23 21:13:00 +0200
commitd6f4b91ba51775d04ee146794d1ea4767c5b6d0b (patch)
tree81cccd735eebdc709b384c0fe43b85131733a05d /libavfilter/framesync.h
parentc1b6165b7341a6a83d289463c65119a5843aae5a (diff)
avfilter/framesync: Remove redundant setting of AVClass
Every filter exposing the framesync options via its child_next callback already calls framesync_preinit() in its preinit callback. So the filter is already preinited whenever its child_next is called. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/framesync.h')
-rw-r--r--libavfilter/framesync.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavfilter/framesync.h b/libavfilter/framesync.h
index a1db87187e..a246d2d1e5 100644
--- a/libavfilter/framesync.h
+++ b/libavfilter/framesync.h
@@ -209,11 +209,6 @@ typedef struct FFFrameSync {
} FFFrameSync;
/**
- * Get the class for the framesync object.
- */
-const AVClass *ff_framesync_get_class(void);
-
-/**
* Pre-initialize a frame sync structure.
*
* It sets the class pointer and inits the options to their default values.
@@ -310,6 +305,9 @@ static const AVClass name##_class = { \
.child_next = func_prefix##_child_next, \
}
+/* A filter that uses the *_child_next-function from this macro
+ * is required to initialize the FFFrameSync structure in AVFilter.preinit
+ * via the *_framesync_preinit function defined alongside it. */
#define FRAMESYNC_AUXILIARY_FUNCS(func_prefix, context, field) \
static int func_prefix##_framesync_preinit(AVFilterContext *ctx) \
{ \
@@ -320,7 +318,6 @@ static int func_prefix##_framesync_preinit(AVFilterContext *ctx) \
static void *func_prefix##_child_next(void *obj, void *prev) \
{ \
context *s = obj; \
- s->fs.class = ff_framesync_get_class(); /* FIXME */ \
return prev ? NULL : &s->field; \
}