| 554 | } |
| 555 | |
| 556 | void parse_loglevel(int argc, char **argv, const OptionDef *options) |
| 557 | { |
| 558 | int idx; |
| 559 | char *env; |
| 560 | |
| 561 | check_options(options); |
| 562 | |
| 563 | idx = locate_option(argc, argv, options, "loglevel"); |
| 564 | if (!idx) |
| 565 | idx = locate_option(argc, argv, options, "v"); |
| 566 | if (idx && argv[idx + 1]) |
| 567 | opt_loglevel(NULL, "loglevel", argv[idx + 1]); |
| 568 | idx = locate_option(argc, argv, options, "report"); |
| 569 | env = getenv_utf8("FFREPORT"); |
| 570 | if (env || idx) { |
| 571 | FILE *report_file = NULL; |
| 572 | init_report(env, &report_file); |
| 573 | if (report_file) { |
| 574 | int i; |
| 575 | fprintf(report_file, "Command line:\n"); |
| 576 | for (i = 0; i < argc; i++) { |
| 577 | dump_argument(report_file, argv[i]); |
| 578 | fputc(i < argc - 1 ? ' ' : '\n', report_file); |
| 579 | } |
| 580 | fflush(report_file); |
| 581 | } |
| 582 | } |
| 583 | freeenv_utf8(env); |
| 584 | idx = locate_option(argc, argv, options, "hide_banner"); |
| 585 | if (idx) |
| 586 | hide_banner = 1; |
| 587 | } |
| 588 | |
| 589 | static const AVOption *opt_find(void *obj, const char *name, const char *unit, |
| 590 | int opt_flags, int search_flags) |
no test coverage detected