| 504 | } |
| 505 | |
| 506 | void parse_loglevel(int argc, char **argv, const OptionDef *options) |
| 507 | { |
| 508 | int idx = locate_option(argc, argv, options, "loglevel"); |
| 509 | const char *env; |
| 510 | |
| 511 | check_options(options); |
| 512 | |
| 513 | if (!idx) |
| 514 | idx = locate_option(argc, argv, options, "v"); |
| 515 | if (idx && argv[idx + 1]) |
| 516 | opt_loglevel(NULL, "loglevel", argv[idx + 1]); |
| 517 | idx = locate_option(argc, argv, options, "report"); |
| 518 | if ((env = getenv("FFREPORT")) || idx) { |
| 519 | init_report(env); |
| 520 | if (report_file) { |
| 521 | int i; |
| 522 | fprintf(report_file, "Command line:\n"); |
| 523 | for (i = 0; i < argc; i++) { |
| 524 | dump_argument(argv[i]); |
| 525 | fputc(i < argc - 1 ? ' ' : '\n', report_file); |
| 526 | } |
| 527 | fflush(report_file); |
| 528 | } |
| 529 | } |
| 530 | idx = locate_option(argc, argv, options, "hide_banner"); |
| 531 | if (idx) |
| 532 | hide_banner = 1; |
| 533 | } |
| 534 | |
| 535 | static const AVOption *opt_find(void *obj, const char *name, const char *unit, |
| 536 | int opt_flags, int search_flags) |
no test coverage detected