avconv.c:4015: error: Null Dereference
  pointer `today` last assigned on line 4013 could be null and is dereferenced at line 4015, column 69.

avconv.c:4009:1: start of procedure opt_vstats()
4007. }
4008. 
4009. static int opt_vstats(const char *opt, const char *arg)
      ^
4010. {
4011.     char filename[40];

avconv.c:4012:5: 
4010. {
4011.     char filename[40];
4012.     time_t today2 = time(NULL);
          ^
4013.     struct tm *today = localtime(&today2);
4014. 

avconv.c:4013:5: 
4011.     char filename[40];
4012.     time_t today2 = time(NULL);
4013.     struct tm *today = localtime(&today2);
          ^
4014. 
4015.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,

avconv.c:4015:5: 
4013.     struct tm *today = localtime(&today2);
4014. 
4015.     snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
          ^
4016.              today->tm_sec);
4017.     return opt_vstats_file(opt, filename);
