History

Revert "cmdutils: allow specifying the file for -report"

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.

Michael Niedermayer committed 14 years ago

Commit 4e6fa5b1 parent 50d3a1a3 files · +0 −14Browse files

Unified · Split

3 files
  1. cmdutils.c +0 −11
  2. cmdutils.h +0 −2
  3. cmdutils_common_opts.h +0 −1
cmdutils.c+0−11
@@ -528,17 +528,6 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg) · 527 unmodified lines
528528 return 0;
529529 }
530530
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−
542531 int opt_report(const char *opt)
543532 {
544533 char filename[64];
cmdutils.h+0−2
@@ -84,8 +84,6 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg); · 83 unmodified lines
8484
8585 int opt_report(const char *opt);
8686
87−int opt_report_file(void *optctx, const char *opt, const char *arg);
88−
8987 int opt_max_alloc(void *optctx, const char *opt, const char *arg);
9088
9189 int opt_cpuflags(void *optctx, const char *opt, const char *arg);
cmdutils_common_opts.h+0−1
@@ -19,6 +19,5 @@ · 18 unmodified lines
1919 { "debug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" },
2020 { "fdebug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" },
2121 { "report" , 0, {(void*)opt_report}, "generate a report" },
22− { "report_file", HAS_ARG, {.func_arg = opt_report_file}, "filename for storing the report" },
2322 { "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
2423 { "cpuflags" , HAS_ARG | OPT_EXPERT, {.func_arg = opt_cpuflags}, "force specific cpu flags", "flags" },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t