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

Function locate_option

fftools/cmdutils.c:489–514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489int locate_option(int argc, char **argv, const OptionDef *options,
490 const char *optname)
491{
492 const OptionDef *po;
493 int i;
494
495 for (i = 1; i < argc; i++) {
496 const char *cur_opt = argv[i];
497
498 if (!(cur_opt[0] == '-' && cur_opt[1]))
499 continue;
500 cur_opt++;
501
502 po = find_option(options, cur_opt);
503 if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o')
504 po = find_option(options, cur_opt + 2);
505
506 if ((!po->name && !strcmp(cur_opt, optname)) ||
507 (po->name && !strcmp(optname, po->name)))
508 return i;
509
510 if (!po->name || opt_has_arg(po))
511 i++;
512 }
513 return 0;
514}
515
516static void dump_argument(FILE *report_file, const char *a)
517{

Callers 2

show_bannerFunction · 0.85
parse_loglevelFunction · 0.85

Calls 2

find_optionFunction · 0.85
opt_has_argFunction · 0.85

Tested by

no test coverage detected