[FFmpeg-devel] [PATCH 4/9] Make link_filter_inouts() return meaningful error codes.
Stefano Sabatini
stefano.sabatini-lala
Fri Nov 5 18:20:28 CET 2010
---
libavfilter/graphparser.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 593df51..bd1a440 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -198,7 +198,7 @@ static int link_filter_inouts(AVFilterContext *filter,
AVFilterInOut **curr_inputs,
AVFilterInOut **open_inputs, AVClass *log_ctx)
{
- int pad = filter->input_count;
+ int pad = filter->input_count, ret;
while (pad--) {
AVFilterInOut *p = *curr_inputs;
@@ -206,14 +206,14 @@ static int link_filter_inouts(AVFilterContext *filter,
av_log(log_ctx, AV_LOG_ERROR,
"Not enough inputs specified for the \"%s\" filter.\n",
filter->filter->name);
- return -1;
+ return AVERROR(EINVAL);
}
*curr_inputs = (*curr_inputs)->next;
if (p->filter) {
- if (link_filter(p->filter, p->pad_idx, filter, pad, log_ctx))
- return -1;
+ if ((ret = link_filter(p->filter, p->pad_idx, filter, pad, log_ctx)) < 0)
+ return ret;
av_free(p->name);
av_free(p);
} else {
@@ -227,7 +227,7 @@ static int link_filter_inouts(AVFilterContext *filter,
av_log(log_ctx, AV_LOG_ERROR,
"Too many inputs specified for the \"%s\" filter.\n",
filter->filter->name);
- return -1;
+ return AVERROR(EINVAL);
}
pad = filter->output_count;
--
1.7.1
More information about the ffmpeg-devel
mailing list