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

ffmpeg.c:4156:1: start of procedure opt_vstats()
4154. }
4155. 
4156. static void opt_vstats (void)
      ^
4157. {
4158.     char filename[40];

ffmpeg.c:4159:5: 
4157. {
4158.     char filename[40];
4159.     time_t today2 = time(NULL);
          ^
4160.     struct tm *today = localtime(&today2);
4161. 

ffmpeg.c:4160:5: 
4158.     char filename[40];
4159.     time_t today2 = time(NULL);
4160.     struct tm *today = localtime(&today2);
          ^
4161. 
4162.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,

ffmpeg.c:4162:5: 
4160.     struct tm *today = localtime(&today2);
4161. 
4162.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
          ^
4163.              today->tm_sec);
4164.     opt_vstats_file(filename);

static void opt_vstats (void)
{
    char filename[40];
    time_t today2 = time(NULL);
    struct tm *today = localtime(&today2);
    snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
             today->tm_sec);
    opt_vstats_file(filename);
}
['static void opt_vstats (void)\n{\n    char filename[40];\n    time_t today2 = time(NULL);\n    struct tm *today = localtime(&today2);\n    snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,\n             today->tm_sec);\n    opt_vstats_file(filename);\n}']