Commit a78dbada authored by Martin Storsjö's avatar Martin Storsjö
Browse files

movenc: Don't store a nonzero creation time if nothing was set by the caller

If the creation time is stored in the file as a zero, the
mov demuxer skips exporting the creation time. Currently,
files muxed without a creation time get demuxed with a
Jan 1st 1970 creation timestamp.
Signed-off-by: default avatarMartin Storsjö <>
parent 353a2d21
......@@ -2317,7 +2317,8 @@ static int mov_write_header(AVFormatContext *s)
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);
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