History

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.

Anton Khirnov committed 13 years ago

Commit bc1a9851 parent 38f0c077 files · +83 −20Browse files

Showing the changes to libavfilter/graphparser.c (1 of 7 files). Show all

Unified · Split

libavfilter/graphparser.c+2−7
@@ -109,16 +109,11 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind · 108 unmodified lines
109 return AVERROR(EINVAL);109 return AVERROR(EINVAL);
110 }110 }
111 111
112 ret = avfilter_open(filt_ctx, filt, inst_name);112 *filt_ctx = avfilter_graph_alloc_filter(ctx, filt, inst_name);
113 if (!*filt_ctx) {113 if (!*filt_ctx) {
114 av_log(log_ctx, AV_LOG_ERROR,114 av_log(log_ctx, AV_LOG_ERROR,
115 "Error creating filter '%s'\n", filt_name);115 "Error creating filter '%s'\n", filt_name);
116 return ret;116 return AVERROR(ENOMEM);
117 }
118
119 if ((ret = avfilter_graph_add_filter(ctx, *filt_ctx)) < 0) {
120 avfilter_free(*filt_ctx);
121 return ret;
122 }117 }
123 118
124 if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&119 if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t