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
528 return 0;528 return 0;
529}529}
530 530
531int 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
542int opt_report(const char *opt)531int opt_report(const char *opt)
543{532{
544 char filename[64];533 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
84 84
85int opt_report(const char *opt);85int opt_report(const char *opt);
86 86
87int opt_report_file(void *optctx, const char *opt, const char *arg);
88
89int opt_max_alloc(void *optctx, const char *opt, const char *arg);87int opt_max_alloc(void *optctx, const char *opt, const char *arg);
90 88
91int opt_cpuflags(void *optctx, const char *opt, const char *arg);89int opt_cpuflags(void *optctx, const char *opt, const char *arg);
cmdutils_common_opts.h+0−1
@@ -19,6 +19,5 @@ · 18 unmodified lines
19 { "debug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" },19 { "debug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" },
20 { "fdebug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" },20 { "fdebug" , HAS_ARG, {.func_arg = opt_codec_debug}, "set debug flags", "flags" },
21 { "report" , 0, {(void*)opt_report}, "generate a report" },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 { "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },22 { "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
24 { "cpuflags" , HAS_ARG | OPT_EXPERT, {.func_arg = opt_cpuflags}, "force specific cpu flags", "flags" },23 { "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