]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg_opt.c
avcodec/jpeg2000dwt: Support 9/7 singularity cases on the encoder side
[ffmpeg] / ffmpeg_opt.c
index 1c5794ce092b8be221150fb065e53f44da7f7a12..69222dea7e855393484f142d1e12354f74a31fd7 100644 (file)
@@ -2438,6 +2438,11 @@ static int opt_vstats(void *optctx, const char *opt, const char *arg)
     time_t today2 = time(NULL);
     struct tm *today = localtime(&today2);
 
+    if (!today) { // maybe tomorrow
+        av_log(NULL, AV_LOG_FATAL, "Unable to get current time: %s\n", strerror(errno));
+        exit_program(1);
+    }
+
     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
              today->tm_sec);
     return opt_vstats_file(NULL, opt, filename);