mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user