mirror of https://git.ffmpeg.org/ffmpeg.git
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: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
353a2d2164
commit
a78dbada55
|
@ -2317,6 +2317,7 @@ static int mov_write_header(AVFormatContext *s)
|
||||||
#endif
|
#endif
|
||||||
if (t = av_dict_get(s->metadata, "creation_time", NULL, 0))
|
if (t = av_dict_get(s->metadata, "creation_time", NULL, 0))
|
||||||
mov->time = ff_iso8601_to_unix_time(t->value);
|
mov->time = ff_iso8601_to_unix_time(t->value);
|
||||||
|
if (mov->time)
|
||||||
mov->time += 0x7C25B080; // 1970 based -> 1904 based
|
mov->time += 0x7C25B080; // 1970 based -> 1904 based
|
||||||
|
|
||||||
if (mov->chapter_track)
|
if (mov->chapter_track)
|
||||||
|
|
Loading…
Reference in New Issue