Revision 688b9dad libavfilter/graphparser.c

View differences:

libavfilter/graphparser.c
141 141
/**
142 142
 * Parse "filter=params"
143 143
 */
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)
146 146
{
147 147
    char *opts = NULL;
148 148
    char *name = av_get_token(buf, "=,;[\n");
149
    AVFilterContext *filt_ctx;
150 149
    int ret;
151 150

  
152 151
    if (**buf == '=') {
......
154 153
        opts = av_get_token(buf, "[],;\n");
155 154
    }
156 155

  
157
    ret = create_filter(&filt_ctx, graph, index, name, opts, log_ctx);
156
    ret = create_filter(filt_ctx, graph, index, name, opts, log_ctx);
158 157
    av_free(name);
159 158
    av_free(opts);
160
    return filt_ctx;
159
    return ret;
161 160
}
162 161

  
163 162
static void free_inout(AVFilterInOut *head)
......
326 325
        if (parse_inputs(&filters, &curr_inputs, &open_outputs, log_ctx) < 0)
327 326
            goto fail;
328 327

  
329
        filter = parse_filter(&filters, graph, index, log_ctx);
330

  
331
        if (!filter)
328
        if (parse_filter(&filter, &filters, graph, index, log_ctx) < 0)
332 329
            goto fail;
333 330

  
334 331
        if (filter->input_count == 1 && !curr_inputs && !index) {

Also available in: Unified diff