| 213 | } |
| 214 | |
| 215 | static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs, |
| 216 | AVFilterInOut **open_outputs, AVClass *log_ctx) |
| 217 | { |
| 218 | int pad = 0; |
| 219 | |
| 220 | while(**buf == '[') { |
| 221 | char *name = parse_link_name(buf, log_ctx); |
| 222 | AVFilterInOut *match; |
| 223 | |
| 224 | if(!name) |
| 225 | return -1; |
| 226 | |
| 227 | /* First check if the label is not in the open_outputs list */ |
| 228 | match = extract_inout(name, open_outputs); |
| 229 | |
| 230 | if(match) { |
| 231 | av_free(name); |
| 232 | } else { |
| 233 | /* Not in the list, so add it as an input */ |
| 234 | match = av_mallocz(sizeof(AVFilterInOut)); |
| 235 | match->name = name; |
| 236 | match->pad_idx = pad; |
| 237 | } |
| 238 | |
| 239 | insert_inout(curr_inputs, match); |
| 240 | |
| 241 | *buf += strspn(*buf, WHITESPACES); |
| 242 | pad++; |
| 243 | } |
| 244 | |
| 245 | return pad; |
| 246 | } |
| 247 | |
| 248 | static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, |
| 249 | AVFilterInOut **open_inputs, |
no test coverage detected