This reverts commit 841bf0ef240f0d862b1f07076e079829456fb117. This does not fully work as the file is used before the filename is parsed so not all information is written in the specified file.
Unified · Split
| @@ -528,17 +528,6 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg) · 527 unmodified lines | ||
| 528 | 528 | return 0; |
| 529 | 529 | } |
| 530 | 530 | |
| 531 | −int opt_report_file(void *optctx, const char *opt, const char *arg) | |
| 532 | −{ | |
| 533 | − report_file = fopen(arg, "w"); | |
| 534 | − if (!report_file) { | |
| 535 | − av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n", | |
| 536 | − arg, strerror(errno)); | |
| 537 | − return AVERROR(errno); | |
| 538 | − } | |
| 539 | − return 0; | |
| 540 | −} | |
| 541 | − | |
| 542 | 531 | int opt_report(const char *opt) |
| 543 | 532 | { |
| 544 | 533 | char filename[64]; |
| @@ -84,8 +84,6 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg); · 83 unmodified lines | ||
| 84 | 84 | |
| 85 | 85 | int opt_report(const char *opt); |
| 86 | 86 | |
| 87 | −int opt_report_file(void *optctx, const char *opt, const char *arg); | |
| 88 | − | |
| 89 | 87 | int opt_max_alloc(void *optctx, const char *opt, const char *arg); |
| 90 | 88 | |
| 91 | 89 | int opt_cpuflags(void *optctx, const char *opt, const char *arg); |
| @@ -19,6 +19,5 @@ · 18 unmodified lines | ||
| 19 | 19 | { "debug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" }, |
| 20 | 20 | { "fdebug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" }, |
| 21 | 21 | { "report" , 0, {(void*)opt_report}, "generate a report" }, |
| 22 | − { "report_file", HAS_ARG, {.func_arg = opt_report_file}, "filename for storing the report" }, | |
| 23 | 22 | { "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" }, |
| 24 | 23 | { "cpuflags" , HAS_ARG | OPT_EXPERT, {.func_arg = opt_cpuflags}, "force specific cpu flags", "flags" }, |