[FFmpeg-cvslog] mov: add workaround for incorrect 0 time point.

Michael Niedermayer git at videolan.org
Sun Jul 1 21:48:43 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jul  1 21:41:06 2012 +0200| [23eeffcd48a15e73fb2649b712870b6d101c5471] | committer: Michael Niedermayer

mov: add workaround for incorrect 0 time point.

Fixes Ticket1471

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23eeffcd48a15e73fb2649b712870b6d101c5471
---

 libavformat/mov.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index af5b126..faa8c65 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -780,7 +780,8 @@ static void mov_metadata_creation_time(AVDictionary **metadata, time_t time)
     char buffer[32];
     if (time) {
         struct tm *ptm;
-        time -= 2082844800;  /* seconds between 1904-01-01 and Epoch */
+        if(time >= 2082844800)
+            time -= 2082844800;  /* seconds between 1904-01-01 and Epoch */
         ptm = gmtime(&time);
         if (!ptm) return;
         strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm);



More information about the ffmpeg-cvslog mailing list