ffmpeg.c:4040: error: Null Dereference
  pointer `today` last assigned on line 4038 could be null and is dereferenced at line 4040, column 69.

ffmpeg.c:4034:1: start of procedure opt_vstats()
4032. }
4033. 
4034. static void opt_vstats (void)
      ^
4035. {
4036.     char filename[40];

ffmpeg.c:4037:5: 
4035. {
4036.     char filename[40];
4037.     time_t today2 = time(NULL);
          ^
4038.     struct tm *today = localtime(&today2);
4039. 

ffmpeg.c:4038:5: 
4036.     char filename[40];
4037.     time_t today2 = time(NULL);
4038.     struct tm *today = localtime(&today2);
          ^
4039. 
4040.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,

ffmpeg.c:4040:5: 
4038.     struct tm *today = localtime(&today2);
4039. 
4040.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
          ^
4041.              today->tm_sec);
4042.     opt_vstats_file(filename);
