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

Function parse_inputs

libavfilter/graphparser.c:215–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215static 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
248static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs,
249 AVFilterInOut **open_inputs,

Callers 1

avfilter_graph_parseFunction · 0.85

Calls 5

parse_link_nameFunction · 0.85
extract_inoutFunction · 0.85
av_freeFunction · 0.85
av_malloczFunction · 0.85
insert_inoutFunction · 0.85

Tested by

no test coverage detected