summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/movenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e11eb509d8..85b5667076 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2317,7 +2317,8 @@ static int mov_write_header(AVFormatContext *s)
#endif
if (t = av_dict_get(s->metadata, "creation_time", NULL, 0))
mov->time = ff_iso8601_to_unix_time(t->value);
- mov->time += 0x7C25B080; //1970 based -> 1904 based
+ if (mov->time)
+ mov->time += 0x7C25B080; // 1970 based -> 1904 based
if (mov->chapter_track)
mov_create_chapter_track(s, mov->chapter_track);