Browse Source

mov: add workaround for incorrect 0 time point.

Fixes Ticket1471

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
23eeffcd48
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/mov.c

+ 2
- 1
libavformat/mov.c View File

@@ -780,7 +780,8 @@ static void mov_metadata_creation_time(AVDictionary **metadata, time_t time)
char buffer[32]; char buffer[32];
if (time) { if (time) {
struct tm *ptm; 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); ptm = gmtime(&time);
if (!ptm) return; if (!ptm) return;
strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm); strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm);


Loading…
Cancel
Save