Commit 23eeffcd authored by Michael Niedermayer's avatar Michael Niedermayer

mov: add workaround for incorrect 0 time point.

Fixes Ticket1471
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c23dcd97
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment