Commit 9cbeb9df authored by vitor's avatar vitor

Use link_filter() instead avfilter_link() when clearer

Commited in SoC by Vitor Sessak on 2008-04-06 18:17:29


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13290 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 145be7e2
......@@ -294,11 +294,9 @@ 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 == ',') {
if (link_filter(last_filt, oldpad, filter, 0) < 0)
......@@ -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,13 +358,10 @@ 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;
fail:
......
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