Commit ee75692a authored by Vitor Sessak's avatar Vitor Sessak
Browse files

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
parent 9710beaf
...@@ -294,10 +294,8 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt ...@@ -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 // If the first filter has an input and none was given, it is
// implicitly the input of the whole graph. // implicitly the input of the whole graph.
if (pad == 0 && graph->filters[graph->filter_count-1]->input_count == 1) { if (pad == 0 && graph->filters[graph->filter_count-1]->input_count == 1) {
if(avfilter_link(in, inpad, filter, 0)) { if(link_filter(in, inpad, filter, 0))
av_log(&log_ctx, AV_LOG_ERROR, "cannot create link between source and destination filters\n");
goto fail; goto fail;
}
} }
if(chr == ',') { if(chr == ',') {
...@@ -317,17 +315,14 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt ...@@ -317,17 +315,14 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt
continue; // Already processed continue; // Already processed
if (!strcmp(inout->name, "in")) { if (!strcmp(inout->name, "in")) {
if(avfilter_link(in, inpad, inout->instance, inout->pad_idx)) { if(link_filter(in, inpad, inout->instance, inout->pad_idx))
av_log(&log_ctx, AV_LOG_ERROR, "cannot create link between source and destination filters\n");
goto fail; goto fail;
}
} else if (!strcmp(inout->name, "out")) { } else if (!strcmp(inout->name, "out")) {
has_out = 1; has_out = 1;
if(avfilter_link(inout->instance, inout->pad_idx, out, outpad)) { if(link_filter(inout->instance, inout->pad_idx, out, outpad))
av_log(&log_ctx, AV_LOG_ERROR, "cannot create link between source and destination filters\n");
goto fail; goto fail;
}
} else { } else {
AVFilterInOut *p, *src, *dst; AVFilterInOut *p, *src, *dst;
...@@ -363,11 +358,8 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt ...@@ -363,11 +358,8 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt
free_inout(head); free_inout(head);
if (!has_out) { if (!has_out) {
if(avfilter_link(last_filt, pad, out, outpad)) { if(link_filter(last_filt, pad, out, outpad))
av_log(&log_ctx, AV_LOG_ERROR, "cannot create link between source and destination filters\n");
goto fail; goto fail;
}
} }
return 0; return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment