diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-07-06 00:41:27 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-07-10 01:29:17 +0200 |
commit | 21d56098265656b9b7e97a3ae385ca08bb93f729 (patch) | |
tree | 30d1f7bce55ff5b9ea0d843e360436cef2becaec /libavfilter/avfilter.c | |
parent | aef9e94f73b9e5e21f7a790343e0b4ffb9e2acee (diff) |
lavfi: add init_opaque callback
This will be used by filters which require an opaque field to be passed
in input. Should be required only for filters which imply a programmatic
use.
This is possibly a temporary solution, to be removed when we'll have a
clearer and better agreememnt of how/if to pass binary data for
initializing a filter.
See thread:
Subject: [FFmpeg-devel][PATCH] lavfi: add init2 callback
Date: Fri, 6 Jul 2012 01:22:17 +0200
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 01f34423c9..5094105e44 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -554,7 +554,9 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque { int ret=0; - if (filter->filter->init) + if (filter->filter->init_opaque) + ret = filter->filter->init_opaque(filter, args, opaque); + else if (filter->filter->init) ret = filter->filter->init(filter, args); return ret; } |