diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-10-10 18:54:39 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-10-10 18:54:39 +0000 |
commit | 69f73a89288229aa96730808a1445d340d9673ac (patch) | |
tree | a337bf4c1695c521c61b700dcb25cf4b11f63151 /libavfilter/avfilter.c | |
parent | e4dccc0d59c934392d88a3c643b13305830f6835 (diff) | |
download | ffmpeg-69f73a89288229aa96730808a1445d340d9673ac.tar.gz |
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
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index ea6f9fed83..7005ff2ccb 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -156,6 +156,7 @@ int avfilter_config_links(AVFilterContext *filter) { int (*config_link)(AVFilterLink *); unsigned i; + int ret; for (i = 0; i < filter->input_count; i ++) { AVFilterLink *link = filter->inputs[i]; @@ -171,17 +172,17 @@ int avfilter_config_links(AVFilterContext *filter) case AVLINK_UNINIT: link->init_state = AVLINK_STARTINIT; - if (avfilter_config_links(link->src)) - return -1; + if ((ret = avfilter_config_links(link->src)) < 0) + return ret; if (!(config_link = link->srcpad->config_props)) config_link = avfilter_default_config_output_link; - if (config_link(link)) - return -1; + if ((ret = config_link(link)) < 0) + return ret; if ((config_link = link->dstpad->config_props)) - if (config_link(link)) - return -1; + if ((ret = config_link(link)) < 0) + return ret; link->init_state = AVLINK_INIT; } |