History

Make link_filter_inouts() return meaningful error codes.

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

Stefano Sabatini committed 16 years ago

Commit 684ade41 parent 688b9da1 file · +5 −5Browse files

Showing the changes to libavfilter/graphparser.c (1 of 1 file). Show all

Unified · Split

libavfilter/graphparser.c+5−5
@@ -194,7 +194,7 @@ static int link_filter_inouts(AVFilterContext *filter, · 193 unmodified lines
194194 AVFilterInOut **curr_inputs,
195195 AVFilterInOut **open_inputs, AVClass *log_ctx)
196196 {
197− int pad = filter->input_count;
197+ int pad = filter->input_count, ret;
198198
199199 while (pad--) {
200200 AVFilterInOut *p = *curr_inputs;
@@ -202,14 +202,14 @@ static int link_filter_inouts(AVFilterContext *filter, · 1 unmodified line
202202 av_log(log_ctx, AV_LOG_ERROR,
203203 "Not enough inputs specified for the \"%s\" filter.\n",
204204 filter->filter->name);
205− return -1;
205+ return AVERROR(EINVAL);
206206 }
207207
208208 *curr_inputs = (*curr_inputs)->next;
209209
210210 if (p->filter) {
211− if (link_filter(p->filter, p->pad_idx, filter, pad, log_ctx))
212− return -1;
211+ if ((ret = link_filter(p->filter, p->pad_idx, filter, pad, log_ctx)) < 0)
212+ return ret;
213213 av_free(p->name);
214214 av_free(p);
215215 } else {
@@ -223,7 +223,7 @@ static int link_filter_inouts(AVFilterContext *filter, · 7 unmodified lines
223223 av_log(log_ctx, AV_LOG_ERROR,
224224 "Too many inputs specified for the \"%s\" filter.\n",
225225 filter->filter->name);
226− return -1;
226+ return AVERROR(EINVAL);
227227 }
228228
229229 pad = filter->output_count;

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