diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-07 18:40:12 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-07 18:40:12 +0000 |
commit | 0cc8b65950dca4a2d80b827a4e8b7a5effe28a55 (patch) | |
tree | c0683ad04a4731554f775fb492d84a6f8ed0a340 | |
parent | 00b3ca3c7a779e3b062d6ef0c5067c60c8f8a357 (diff) | |
download | ffmpeg-0cc8b65950dca4a2d80b827a4e8b7a5effe28a55.tar.gz |
Make parse_outputs() always return meaningful error codes.
Originally committed as revision 25698 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavfilter/graphparser.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index 3b49898ba2..2929776a60 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -277,7 +277,7 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, AVFilterInOut **open_inputs, AVFilterInOut **open_outputs, AVClass *log_ctx) { - int pad = 0; + int ret, pad = 0; while (**buf == '[') { char *name = parse_link_name(buf, log_ctx); @@ -287,15 +287,15 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, *curr_inputs = (*curr_inputs)->next; if (!name) - return -1; + return AVERROR(EINVAL); /* First check if the label is not in the open_inputs list */ match = extract_inout(name, open_inputs); if (match) { - if (link_filter(input->filter, input->pad_idx, - match->filter, match->pad_idx, log_ctx) < 0) - return -1; + if ((ret = link_filter(input->filter, input->pad_idx, + match->filter, match->pad_idx, log_ctx)) < 0) + return ret; av_free(match->name); av_free(name); av_free(match); |