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
194 AVFilterInOut **curr_inputs,194 AVFilterInOut **curr_inputs,
195 AVFilterInOut **open_inputs, AVClass *log_ctx)195 AVFilterInOut **open_inputs, AVClass *log_ctx)
196{196{
197 int pad = filter->input_count;197 int pad = filter->input_count, ret;
198 198
199 while (pad--) {199 while (pad--) {
200 AVFilterInOut *p = *curr_inputs;200 AVFilterInOut *p = *curr_inputs;
@@ -202,14 +202,14 @@ static int link_filter_inouts(AVFilterContext *filter, · 1 unmodified line
202 av_log(log_ctx, AV_LOG_ERROR,202 av_log(log_ctx, AV_LOG_ERROR,
203 "Not enough inputs specified for the \"%s\" filter.\n",203 "Not enough inputs specified for the \"%s\" filter.\n",
204 filter->filter->name);204 filter->filter->name);
205 return -1;205 return AVERROR(EINVAL);
206 }206 }
207 207
208 *curr_inputs = (*curr_inputs)->next;208 *curr_inputs = (*curr_inputs)->next;
209 209
210 if (p->filter) {210 if (p->filter) {
211 if (link_filter(p->filter, p->pad_idx, filter, pad, log_ctx))211 if ((ret = link_filter(p->filter, p->pad_idx, filter, pad, log_ctx)) < 0)
212 return -1;212 return ret;
213 av_free(p->name);213 av_free(p->name);
214 av_free(p);214 av_free(p);
215 } else {215 } else {
@@ -223,7 +223,7 @@ static int link_filter_inouts(AVFilterContext *filter, · 7 unmodified lines
223 av_log(log_ctx, AV_LOG_ERROR,223 av_log(log_ctx, AV_LOG_ERROR,
224 "Too many inputs specified for the \"%s\" filter.\n",224 "Too many inputs specified for the \"%s\" filter.\n",
225 filter->filter->name);225 filter->filter->name);
226 return -1;226 return AVERROR(EINVAL);
227 }227 }
228 228
229 pad = filter->output_count;229 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