summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-01 02:35:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-01 02:59:44 +0100
commit841bf0ef240f0d862b1f07076e079829456fb117 (patch)
tree9b18d2a23b11f7824b7e0e47c1f07fe33947a259 /cmdutils.c
parent7139f0e6bef49b64c8432068990454bf3cbe34e9 (diff)
cmdutils: allow specifying the file for -report
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c
index f696700142..248462fd80 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -528,6 +528,17 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
return 0;
}
+int opt_report_file(void *optctx, const char *opt, const char *arg)
+{
+ report_file = fopen(arg, "w");
+ if (!report_file) {
+ av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n",
+ arg, strerror(errno));
+ return AVERROR(errno);
+ }
+ return 0;
+}
+
int opt_report(const char *opt)
{
char filename[64];