[FFmpeg-devel] [PATCH 10/11] Make avfilter_config_links() propagate the error code coming from the callee functions.
Stefano Sabatini
stefano.sabatini-lala
Sun Oct 10 17:24:58 CEST 2010
---
libavfilter/avfilter.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 7fc41b3..377d139 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -157,6 +157,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];
@@ -172,20 +173,20 @@ 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 (link->time_base.num == 0 && link->time_base.den == 0)
link->time_base = AV_TIME_BASE_Q;
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;
}
--
1.7.1
More information about the ffmpeg-devel
mailing list