diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-05-24 20:39:03 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-05-24 20:39:03 +0000 |
commit | ee75692a5fcdb3c941a3df811489d3797501d2e7 (patch) | |
tree | 4a7d385a806d6e169dcc1cb3b604344c31282a31 /libavfilter/graphparser.c | |
parent | 9710beaf14bd83cd25397fd80912b5c0094ea1b1 (diff) | |
download | ffmpeg-ee75692a5fcdb3c941a3df811489d3797501d2e7.tar.gz |
Use link_filter() instead avfilter_link() when clearer
Commited in SoC by Vitor Sessak on 2008-04-06 18:17:29
Originally committed as revision 13290 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r-- | libavfilter/graphparser.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index be61c27081..f76883d9b6 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -294,10 +294,8 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt // If the first filter has an input and none was given, it is // implicitly the input of the whole graph. if (pad == 0 && graph->filters[graph->filter_count-1]->input_count == 1) { - if(avfilter_link(in, inpad, filter, 0)) { - av_log(&log_ctx, AV_LOG_ERROR, "cannot create link between source and destination filters\n"); + if(link_filter(in, inpad, filter, 0)) goto fail; - } } if(chr == ',') { @@ -317,17 +315,14 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt continue; // Already processed if (!strcmp(inout->name, "in")) { - if(avfilter_link(in, inpad, inout->instance, inout->pad_idx)) { - av_log(&log_ctx, AV_LOG_ERROR, "cannot create link between source and destination filters\n"); + if(link_filter(in, inpad, inout->instance, inout->pad_idx)) goto fail; - } + } else if (!strcmp(inout->name, "out")) { has_out = 1; - if(avfilter_link(inout->instance, inout->pad_idx, out, outpad)) { - av_log(&log_ctx, AV_LOG_ERROR, "cannot create link between source and destination filters\n"); + if(link_filter(inout->instance, inout->pad_idx, out, outpad)) goto fail; - } } else { AVFilterInOut *p, *src, *dst; @@ -363,11 +358,8 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt free_inout(head); if (!has_out) { - if(avfilter_link(last_filt, pad, out, outpad)) { - av_log(&log_ctx, AV_LOG_ERROR, "cannot create link between source and destination filters\n"); + if(link_filter(last_filt, pad, out, outpad)) goto fail; - } - } return 0; |