1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-01 17:02:14 +02:00

wtv: calculate ole date correctly (is seconds since 1899-12-30)

This commit is contained in:
Peter Ross 2011-05-08 20:14:47 +02:00 committed by Michael Niedermayer
parent 8acab7ae5b
commit fddf0521c6

View File

@ -402,7 +402,7 @@ static void crazytime_to_iso8601(char *buf, int buf_size, int64_t value)
*/ */
static int oledate_to_iso8601(char *buf, int buf_size, int64_t value) static int oledate_to_iso8601(char *buf, int buf_size, int64_t value)
{ {
time_t t = 631112400LL + 86400*av_int2dbl(value); time_t t = (av_int2dbl(value) - 25569.0) * 86400;
struct tm result; struct tm result;
if (!gmtime_r(&t, &result)) if (!gmtime_r(&t, &result))
return -1; return -1;