[FFmpeg-devel] [PATCH 2/2] cmdutils: allow specifying the report file

Michael Niedermayer michaelni at gmx.at
Thu Nov 1 23:16:03 CET 2012


This uses a environment variable as it is tricky through the command line.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 cmdutils.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cmdutils.c b/cmdutils.c
index f696700..f68a25a 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -542,6 +542,10 @@ int opt_report(const char *opt)
              program_name,
              tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
              tm->tm_hour, tm->tm_min, tm->tm_sec);
+
+    if(getenv("FFREPORT_FILE")) {
+        av_strlcpy(filename, getenv("FFREPORT_FILE"), sizeof(filename));
+    }
     report_file = fopen(filename, "w");
     if (!report_file) {
         av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n",
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list