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

ffmpeg.c:4041:1: start of procedure opt_vstats()
4039. }
4040. 
4041. static void opt_vstats (void)
      ^
4042. {
4043.     char filename[40];

ffmpeg.c:4044:5: 
4042. {
4043.     char filename[40];
4044.     time_t today2 = time(NULL);
          ^
4045.     struct tm *today = localtime(&today2);
4046. 

ffmpeg.c:4045:5: 
4043.     char filename[40];
4044.     time_t today2 = time(NULL);
4045.     struct tm *today = localtime(&today2);
          ^
4046. 
4047.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,

ffmpeg.c:4047:5: 
4045.     struct tm *today = localtime(&today2);
4046. 
4047.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
          ^
4048.              today->tm_sec);
4049.     opt_vstats_file(filename);
