[FFmpeg-devel] [PATCH 2/2] wtv: calculate ole date correctly (is seconds since 1899-12-30)
Peter Ross
pross at xvid.org
Sun May 8 13:28:35 CEST 2011
---
libavformat/wtv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index ee7bdda..025d11f 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -429,7 +429,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;
--
1.7.4.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110508/8a31886b/attachment.asc>
More information about the ffmpeg-devel
mailing list