Commit 69f73a89 authored by Stefano Sabatini's avatar Stefano Sabatini

Make avfilter_config_links() propagate the error code coming from the

callee functions.

Originally committed as revision 25433 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e4dccc0d
...@@ -156,6 +156,7 @@ int avfilter_config_links(AVFilterContext *filter) ...@@ -156,6 +156,7 @@ int avfilter_config_links(AVFilterContext *filter)
{ {
int (*config_link)(AVFilterLink *); int (*config_link)(AVFilterLink *);
unsigned i; unsigned i;
int ret;
for (i = 0; i < filter->input_count; i ++) { for (i = 0; i < filter->input_count; i ++) {
AVFilterLink *link = filter->inputs[i]; AVFilterLink *link = filter->inputs[i];
...@@ -171,17 +172,17 @@ int avfilter_config_links(AVFilterContext *filter) ...@@ -171,17 +172,17 @@ int avfilter_config_links(AVFilterContext *filter)
case AVLINK_UNINIT: case AVLINK_UNINIT:
link->init_state = AVLINK_STARTINIT; link->init_state = AVLINK_STARTINIT;
if (avfilter_config_links(link->src)) if ((ret = avfilter_config_links(link->src)) < 0)
return -1; return ret;
if (!(config_link = link->srcpad->config_props)) if (!(config_link = link->srcpad->config_props))
config_link = avfilter_default_config_output_link; config_link = avfilter_default_config_output_link;
if (config_link(link)) if ((ret = config_link(link)) < 0)
return -1; return ret;
if ((config_link = link->dstpad->config_props)) if ((config_link = link->dstpad->config_props))
if (config_link(link)) if ((ret = config_link(link)) < 0)
return -1; return ret;
link->init_state = AVLINK_INIT; link->init_state = AVLINK_INIT;
} }
......
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