MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / locate_option

Function locate_option

ffmpeg-single-cmd/src/main/cpp/cmdutils.c:447–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445}
446
447int locate_option(int argc, char **argv, const OptionDef *options,
448 const char *optname)
449{
450 const OptionDef *po;
451 int i;
452
453 for (i = 1; i < argc; i++) {
454 const char *cur_opt = argv[i];
455
456 if (*cur_opt++ != '-')
457 continue;
458
459 po = find_option(options, cur_opt);
460 if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o')
461 po = find_option(options, cur_opt + 2);
462
463 if ((!po->name && !strcmp(cur_opt, optname)) ||
464 (po->name && !strcmp(optname, po->name)))
465 return i;
466
467 if (!po->name || po->flags & HAS_ARG)
468 i++;
469 }
470 return 0;
471}
472
473static void dump_argument(const char *a)
474{

Callers 2

parse_loglevelFunction · 0.85
show_bannerFunction · 0.85

Calls 1

find_optionFunction · 0.85

Tested by

no test coverage detected