It is necessary for filters with child objects, to set the class and default options values.
Showing the changes to libavfilter/avfilter.h (1 of 2 files). Show all
Unified · Split
| @@ -194,6 +194,21 @@ typedef struct AVFilter { · 193 unmodified lines | |||
| 194 | ***************************************************************** | 194 | ***************************************************************** |
| 195 | */ | 195 | */ |
| 196 | 196 | ||
| 197 | /** | ||
| 198 | * Filter pre-initialization function | ||
| 199 | * | ||
| 200 | * This callback will be called immediately after the filter context is | ||
| 201 | * allocated, to allow allocating and initing sub-objects. | ||
| 202 | * | ||
| 203 | * If this callback is not NULL, the uninit callback will be called on | ||
| 204 | * allocation failure. | ||
| 205 | * | ||
| 206 | * @return 0 on success, | ||
| 207 | * AVERROR code on failure (but the code will be | ||
| 208 | * dropped and treated as ENOMEM by the calling code) | ||
| 209 | */ | ||
| 210 | int (*preinit)(AVFilterContext *ctx); | ||
| 211 | |||
| 197 | /** | 212 | /** |
| 198 | * Filter initialization function. | 213 | * Filter initialization function. |
| 199 | * | 214 | * |