MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / parse_outputs

Function parse_outputs

libavfilter/graphparser.c:248–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs,
249 AVFilterInOut **open_inputs,
250 AVFilterInOut **open_outputs, AVClass *log_ctx)
251{
252 int pad = 0;
253
254 while(**buf == '[') {
255 char *name = parse_link_name(buf, log_ctx);
256 AVFilterInOut *match;
257
258 AVFilterInOut *input = *curr_inputs;
259 *curr_inputs = (*curr_inputs)->next;
260
261 if(!name)
262 return -1;
263
264 /* First check if the label is not in the open_inputs list */
265 match = extract_inout(name, open_inputs);
266
267 if(match) {
268 if(link_filter(input->filter, input->pad_idx,
269 match->filter, match->pad_idx, log_ctx) < 0)
270 return -1;
271 av_free(match->name);
272 av_free(name);
273 av_free(match);
274 av_free(input);
275 } else {
276 /* Not in the list, so add the first input as a open_output */
277 input->name = name;
278 insert_inout(open_outputs, input);
279 }
280 *buf += strspn(*buf, WHITESPACES);
281 pad++;
282 }
283
284 return pad;
285}
286
287int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
288 AVFilterInOut *open_inputs,

Callers 1

avfilter_graph_parseFunction · 0.85

Calls 5

parse_link_nameFunction · 0.85
extract_inoutFunction · 0.85
link_filterFunction · 0.85
av_freeFunction · 0.85
insert_inoutFunction · 0.85

Tested by

no test coverage detected