summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2017-07-31 00:29:01 +0200
committerNicolas George <george@nsup.org>2017-08-29 10:19:04 +0200
commitf8d7b5febba075035a94de5d7d1dc9083ad2f3ed (patch)
tree146cee9da69a3c8dfb9e6261a69109bbf53e0b54 /libavfilter/avfilter.h
parent19804024d5b26e9568ce2f21f15c6664717006cd (diff)
lavfi: add a preinit callback to filters.
It is necessary for filters with child objects, to set the class and default options values.
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 60662c19ac..73a723d583 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -195,6 +195,21 @@ typedef struct AVFilter {
*/
/**
+ * Filter pre-initialization function
+ *
+ * This callback will be called immediately after the filter context is
+ * allocated, to allow allocating and initing sub-objects.
+ *
+ * If this callback is not NULL, the uninit callback will be called on
+ * allocation failure.
+ *
+ * @return 0 on success,
+ * AVERROR code on failure (but the code will be
+ * dropped and treated as ENOMEM by the calling code)
+ */
+ int (*preinit)(AVFilterContext *ctx);
+
+ /**
* Filter initialization function.
*
* This callback will be called only once during the filter lifetime, after