[FFmpeg-cvslog] wtv: calculate ole date correctly (is seconds since 1899-12-30)
Peter Ross
git at videolan.org
Mon May 9 02:28:45 CEST 2011
ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Sun May 8 20:14:47 2011 +0200| [fddf0521c6aca3eef25695094da6d12cb9af183d] | committer: Michael Niedermayer
wtv: calculate ole date correctly (is seconds since 1899-12-30)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fddf0521c6aca3eef25695094da6d12cb9af183d
---
libavformat/wtvdec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 19d5b54..640a6f1 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -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)
{
- time_t t = 631112400LL + 86400*av_int2dbl(value);
+ time_t t = (av_int2dbl(value) - 25569.0) * 86400;
struct tm result;
if (!gmtime_r(&t, &result))
return -1;
More information about the ffmpeg-cvslog
mailing list