Merge commit 'a9b2a51178ea446909015f061ab5df65e3b66bf6'
* commit 'a9b2a51178ea446909015f061ab5df65e3b66bf6': avconv_opt: Check localtime() return value Conflicts: ffmpeg_opt.c See: 8e91d9652ea5048d9014e7636e12c6ed4732d7b7 Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
6cfaa51acb
@ -2438,8 +2438,10 @@ static int opt_vstats(void *optctx, const char *opt, const char *arg)
|
|||||||
time_t today2 = time(NULL);
|
time_t today2 = time(NULL);
|
||||||
struct tm *today = localtime(&today2);
|
struct tm *today = localtime(&today2);
|
||||||
|
|
||||||
if (!today)
|
if (!today) { // maybe tomorrow
|
||||||
return AVERROR(errno);
|
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,
|
snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
|
||||||
today->tm_sec);
|
today->tm_sec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user