History

Change the signature of parse_filter() to make it return an error code.

Originally committed as revision 25692 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 688b9da1 parent c58572f1 file · +5 −8Browse files

Unified · Split

libavfilter/graphparser.c+5−8
@@ -141,12 +141,11 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind · 140 unmodified lines
141141 /**
142142 * Parse "filter=params"
143143 */
144−static AVFilterContext *parse_filter(const char **buf, AVFilterGraph *graph,
145− int index, AVClass *log_ctx)
144+static int parse_filter(AVFilterContext **filt_ctx, const char **buf, AVFilterGraph *graph,
145+ int index, AVClass *log_ctx)
146146 {
147147 char *opts = NULL;
148148 char *name = av_get_token(buf, "=,;[\n");
149− AVFilterContext *filt_ctx;
150149 int ret;
151150
152151 if (**buf == '=') {
@@ -154,10 +153,10 @@ static AVFilterContext *parse_filter(const char **buf, AVFilterGraph *graph, · 1 unmodified line
154153 opts = av_get_token(buf, "[],;\n");
155154 }
156155
157− ret = create_filter(&filt_ctx, graph, index, name, opts, log_ctx);
156+ ret = create_filter(filt_ctx, graph, index, name, opts, log_ctx);
158157 av_free(name);
159158 av_free(opts);
160− return filt_ctx;
159+ return ret;
161160 }
162161
163162 static void free_inout(AVFilterInOut *head)
@@ -326,9 +325,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, · 162 unmodified lines
326325 if (parse_inputs(&filters, &curr_inputs, &open_outputs, log_ctx) < 0)
327326 goto fail;
328327
329− filter = parse_filter(&filters, graph, index, log_ctx);
330−
331− if (!filter)
328+ if (parse_filter(&filter, &filters, graph, index, log_ctx) < 0)
332329 goto fail;
333330
334331 if (filter->input_count == 1 && !curr_inputs && !index) {

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