Revision 2839ff5e

View differences:

libavfilter/graphparser.c
63 63
        return NULL;
64 64
    }
65 65

  
66
    if (avfilter_graph_add_filter(ctx, filt) < 0)
66
    if(avfilter_graph_add_filter(ctx, filt) < 0)
67 67
        return NULL;
68 68

  
69 69
    if(avfilter_init_filter(filt, args, NULL)) {
......
143 143

  
144 144
    *name = consume_string(buf);
145 145

  
146
    if (!*name[0])
146
    if(!*name[0])
147 147
        goto fail;
148 148

  
149
    if (*(*buf)++ != ']')
149
    if(*(*buf)++ != ']')
150 150
        goto fail;
151 151

  
152 152
    return;
......
167 167
    char *name, *opts;
168 168
    name = consume_string(buf);
169 169

  
170
    if (**buf == '=') {
170
    if(**buf == '=') {
171 171
        (*buf)++;
172 172
        opts = consume_string(buf);
173 173
    } else {
......
261 261
        // skip it by now
262 262
        filters = skip_inouts(filters);
263 263

  
264
        if (!(filter = parse_filter(&filters, graph, index)))
264
        if(!(filter = parse_filter(&filters, graph, index)))
265 265
            goto fail;
266 266

  
267 267
        pad = parse_inouts(&inouts, &inout, chr == ',', LinkTypeIn, filter);
268 268

  
269 269
        // If the first filter has an input and none was given, it is
270 270
        // implicitly the input of the whole graph.
271
        if (pad == 0 && filter->input_count == 1) {
271
        if(pad == 0 && filter->input_count == 1) {
272 272
            if(link_filter(in, inpad, filter, 0))
273 273
                goto fail;
274 274
        }
275 275

  
276 276
        if(chr == ',') {
277
            if (link_filter(last_filt, oldpad, filter, 0) < 0)
277
            if(link_filter(last_filt, oldpad, filter, 0) < 0)
278 278
                goto fail;
279 279
        }
280 280

  
......
286 286

  
287 287
    head = inout;
288 288
    for (; inout != NULL; inout = inout->next) {
289
        if (inout->filter == NULL)
289
        if(inout->filter == NULL)
290 290
            continue; // Already processed
291 291

  
292
        if (!strcmp(inout->name, "in")) {
292
        if(!strcmp(inout->name, "in")) {
293 293
            if(link_filter(in, inpad, inout->filter, inout->pad_idx))
294 294
                goto fail;
295 295

  
296
        } else if (!strcmp(inout->name, "out")) {
296
        } else if(!strcmp(inout->name, "out")) {
297 297
            has_out = 1;
298 298

  
299 299
            if(link_filter(inout->filter, inout->pad_idx, out, outpad))
......
304 304
            for (p = inout->next;
305 305
                 p && strcmp(p->name,inout->name); p = p->next);
306 306

  
307
            if (!p) {
307
            if(!p) {
308 308
                av_log(&log_ctx, AV_LOG_ERROR, "Unmatched link: %s.\n",
309 309
                       inout->name);
310 310
                goto fail;
311 311
            }
312 312

  
313
            if (p->type == LinkTypeIn && inout->type == LinkTypeOut) {
313
            if(p->type == LinkTypeIn && inout->type == LinkTypeOut) {
314 314
                src = inout;
315 315
                dst = p;
316
            } else if (p->type == LinkTypeOut && inout->type == LinkTypeIn) {
316
            } else if(p->type == LinkTypeOut && inout->type == LinkTypeIn) {
317 317
                src = p;
318 318
                dst = inout;
319 319
            } else {
......
322 322
                goto fail;
323 323
            }
324 324

  
325
            if (link_filter(src->filter, src->pad_idx, dst->filter, dst->pad_idx) < 0)
325
            if(link_filter(src->filter, src->pad_idx, dst->filter, dst->pad_idx) < 0)
326 326
                goto fail;
327 327

  
328 328
            src->filter = NULL;
......
332 332

  
333 333
    free_inout(head);
334 334

  
335
    if (!has_out) {
335
    if(!has_out) {
336 336
        if(link_filter(last_filt, pad, out, outpad))
337 337
            goto fail;
338 338
    }

Also available in: Unified diff