summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-01 21:41:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-01 21:41:06 +0200
commit23eeffcd48a15e73fb2649b712870b6d101c5471 (patch)
treef6042c8cff0c7c82441440cad72843b2e0409d4e
parentc23dcd9751d44130325cd4552075957e66045f14 (diff)
mov: add workaround for incorrect 0 time point.
Fixes Ticket1471 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mov.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index af5b126261..faa8c65246 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);