Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-21 05:18:08 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-06-21 05:18:08 +0300
commitf98c3ec5c68d14d7c93c2f9775be4583f7905554 (patch)
tree218e9d6ae0c86998d490fcf015802700ac36c803
parentdde6b2a3554553434c9e3435de3c7e94c3affe03 (diff)
avformat/movenc: Check return code of ff_iso8601_to_unix_time()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/movenc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index adde4b2c23..d4bfed31d1 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5247,8 +5247,13 @@ static int mov_write_header(AVFormatContext *s)
mov_write_mdat_tag(pb, mov);
}
- 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);
+ if (mov->time < 0) {
+ av_log(s, AV_LOG_WARNING, "Failed to parse creation_time %s\n", t->value);
+ mov->time = 0;
+ }
+ }
if (mov->time)
mov->time += 0x7C25B080; // 1970 based -> 1904 based