Unified · Split
| @@ -90,7 +90,7 @@ int ff_avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) · 89 unmodified lines | ||
| 90 | 90 | av_log(log_ctx, AV_LOG_ERROR, |
| 91 | 91 | "Input pad \"%s\" for the filter \"%s\" of type \"%s\" not connected to any source\n", |
| 92 | 92 | filt->input_pads[j].name, filt->name, filt->filter->name); |
| 93 | − return -1; | |
| 93 | + return AVERROR(EINVAL); | |
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |
| @@ -99,7 +99,7 @@ int ff_avfilter_graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx) · 2 unmodified lines | ||
| 99 | 99 | av_log(log_ctx, AV_LOG_ERROR, |
| 100 | 100 | "Output pad \"%s\" for the filter \"%s\" of type \"%s\" not connected to any destination\n", |
| 101 | 101 | filt->output_pads[j].name, filt->name, filt->filter->name); |
| 102 | − return -1; | |
| 102 | + return AVERROR(EINVAL); | |
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | } |
| @@ -178,7 +178,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 72 unmodified lines | ||
| 178 | 178 | av_log(log_ctx, AV_LOG_ERROR, |
| 179 | 179 | "Impossible to convert between the formats supported by the filter " |
| 180 | 180 | "'%s' and the filter '%s'\n", link->src->name, link->dst->name); |
| 181 | − return -1; | |
| 181 | + return AVERROR(EINVAL); | |
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | } |
| @@ -216,9 +216,11 @@ static void pick_formats(AVFilterGraph *graph) · 31 unmodified lines | ||
| 216 | 216 | |
| 217 | 217 | int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) |
| 218 | 218 | { |
| 219 | + int ret; | |
| 220 | + | |
| 219 | 221 | /* find supported formats from sub-filters, and merge along links */ |
| 220 | − if (query_formats(graph, log_ctx)) | |
| 221 | − return -1; | |
| 222 | + if ((ret = query_formats(graph, log_ctx)) < 0) | |
| 223 | + return ret; | |
| 222 | 224 | |
| 223 | 225 | /* Once everything is merged, it's possible that we'll still have |
| 224 | 226 | * multiple valid media format choices. We pick the first one. */ |