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:
Anton Khirnov 2013-03-31 08:28:11 +02:00
parent 38f0c0781a
commit bc1a985ba0
7 changed files with 83 additions and 20 deletions

View file

@ -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") &&