lavfi: add a preinit callback to filters.

It is necessary for filters with child objects, to set the class
and default options values.
This commit is contained in:
Nicolas George 2017-07-31 00:29:01 +02:00
parent 19804024d5
commit f8d7b5febb
2 changed files with 23 additions and 0 deletions

View file

@ -194,6 +194,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.
*