History

Make parse_outputs() always return meaningful error codes.

Originally committed as revision 25698 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 0cc8b651 parent 00b3ca31 file · +5 −5Browse files

Unified · Split

libavfilter/graphparser.c+5−5
@@ -277,7 +277,7 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, · 276 unmodified lines
277277 AVFilterInOut **open_inputs,
278278 AVFilterInOut **open_outputs, AVClass *log_ctx)
279279 {
280− int pad = 0;
280+ int ret, pad = 0;
281281
282282 while (**buf == '[') {
283283 char *name = parse_link_name(buf, log_ctx);
@@ -287,15 +287,15 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, · 3 unmodified lines
287287 *curr_inputs = (*curr_inputs)->next;
288288
289289 if (!name)
290− return -1;
290+ return AVERROR(EINVAL);
291291
292292 /* First check if the label is not in the open_inputs list */
293293 match = extract_inout(name, open_inputs);
294294
295295 if (match) {
296− if (link_filter(input->filter, input->pad_idx,
297− match->filter, match->pad_idx, log_ctx) < 0)
298− return -1;
296+ if ((ret = link_filter(input->filter, input->pad_idx,
297+ match->filter, match->pad_idx, log_ctx)) < 0)
298+ return ret;
299299 av_free(match->name);
300300 av_free(name);
301301 av_free(match);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t