mov: add workaround for incorrect 0 time point.
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Jul 2012 19:41:06 +0000 (21:41 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Jul 2012 19:41:06 +0000 (21:41 +0200)
Fixes Ticket1471

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mov.c

index af5b126..faa8c65 100644 (file)
@@ -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);