Commit 6cfaa51a authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'a9b2a511'

* commit 'a9b2a511':
  avconv_opt: Check localtime() return value

Conflicts:
	ffmpeg_opt.c

See: 8e91d965Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 449c74f6 a9b2a511
......@@ -2438,8 +2438,10 @@ static int opt_vstats(void *optctx, const char *opt, const char *arg)
time_t today2 = time(NULL);
struct tm *today = localtime(&today2);
if (!today)
return AVERROR(errno);
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment