X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmov.c;h=f2296f891787440afc880c4246235d15a4b39689;hb=0768aaec1d683226e613e692080a588359c31334;hp=4550cf0ad41356a45f0093391fef1a24e59eeba8;hpb=5c612c5ff8c4adf33ede42ad63183c41334ea2d2;p=ffmpeg diff --git a/libavformat/mov.c b/libavformat/mov.c index 4550cf0ad41..f2296f89178 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1186,6 +1186,12 @@ static void mov_metadata_creation_time(AVDictionary **metadata, int64_t time) if (time) { if(time >= 2082844800) time -= 2082844800; /* seconds between 1904-01-01 and Epoch */ + + if ((int64_t)(time * 1000000ULL) / 1000000 != time) { + av_log(NULL, AV_LOG_DEBUG, "creation_time is not representable\n"); + return; + } + avpriv_dict_set_timestamp(metadata, "creation_time", time * 1000000); } } @@ -5788,6 +5794,7 @@ static int mov_read_close(AVFormatContext *s) av_freep(&mov->fragment_index_data); av_freep(&mov->aes_decrypt); + av_freep(&mov->chapter_tracks); return 0; }