summaryrefslogtreecommitdiff
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-31 08:28:11 +0200
committerAnton Khirnov <anton@khirnov.net>2013-04-11 20:34:14 +0200
commitbc1a985ba030e9861d24965d42792850b43a43ea (patch)
tree5bfe8c12dcb58b6560a0028a03da63bfc36cde80 /libavfilter/graphparser.c
parent38f0c0781a6e099f11c0acec07f9b8be742190c4 (diff)
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.
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 525ae9bd2b..7fbe43b3d0 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -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") &&