summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 41c59d49c1..af6d48b801 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2279,11 +2279,8 @@ static int mov_write_header(AVFormatContext *s)
mov->time = s->timestamp;
else
#endif
- if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) {
- struct tm time = {0};
- strptime(t->value, "%Y - %m - %dT%T", &time);
- mov->time = mktime(&time);
- }
+ 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->chapter_track)