mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-01 09:27:44 +00:00
lavfi: replace avfilter_open() with avfilter_graph_alloc_filter().
Since we do not support "standalone" filters not attached to an AVFilterGraph, we should not have a public function to create such filters. In addition that function is horribly named, the action it does cannot be possibly described as "opening" a filter.
This commit is contained in:
parent
38f0c0781a
commit
bc1a985ba0
7 changed files with 83 additions and 20 deletions
|
@ -109,16 +109,11 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
|
|||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
ret = avfilter_open(filt_ctx, filt, inst_name);
|
||||
*filt_ctx = avfilter_graph_alloc_filter(ctx, filt, inst_name);
|
||||
if (!*filt_ctx) {
|
||||
av_log(log_ctx, AV_LOG_ERROR,
|
||||
"Error creating filter '%s'\n", filt_name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = avfilter_graph_add_filter(ctx, *filt_ctx)) < 0) {
|
||||
avfilter_free(*filt_ctx);
|
||||
return ret;
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue