Revision 684ade49

View differences:

libavfilter/graphparser.c
194 194
                              AVFilterInOut **curr_inputs,
195 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 199
    while (pad--) {
200 200
        AVFilterInOut *p = *curr_inputs;
......
202 202
            av_log(log_ctx, AV_LOG_ERROR,
203 203
                   "Not enough inputs specified for the \"%s\" filter.\n",
204 204
                   filter->filter->name);
205
            return -1;
205
            return AVERROR(EINVAL);
206 206
        }
207 207

  
208 208
        *curr_inputs = (*curr_inputs)->next;
209 209

  
210 210
        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;
213 213
            av_free(p->name);
214 214
            av_free(p);
215 215
        } else {
......
223 223
        av_log(log_ctx, AV_LOG_ERROR,
224 224
               "Too many inputs specified for the \"%s\" filter.\n",
225 225
               filter->filter->name);
226
        return -1;
226
        return AVERROR(EINVAL);
227 227
    }
228 228

  
229 229
    pad = filter->output_count;

Also available in: Unified diff