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);