diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-26 02:38:26 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-26 02:38:26 +0100 |
commit | 4a39d4c65a72860873daa433eab077ffcff0f913 (patch) | |
tree | 62a159e840174773f7ca5927066bd4c2c507a0de /libavformat/mov.c | |
parent | edb069e55689ebff14e689254ce924a30b7bad94 (diff) | |
parent | 82ee7d0dda0fec8cdb670f4e844bf5c2927ad9de (diff) | |
download | ffmpeg-4a39d4c65a72860873daa433eab077ffcff0f913.tar.gz |
Merge commit '82ee7d0dda0fec8cdb670f4e844bf5c2927ad9de'
* commit '82ee7d0dda0fec8cdb670f4e844bf5c2927ad9de':
Use gmtime_r instead of gmtime and localtime_r instead of localtime
Conflicts:
libavformat/mov.c
libavformat/mxfenc.c
libavformat/wtvdec.c
libavutil/parseutils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index bb1858886c..6ba7b96f20 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -35,6 +35,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/intfloat.h" #include "libavutil/mathematics.h" +#include "libavutil/time_internal.h" #include "libavutil/avstring.h" #include "libavutil/dict.h" #include "libavutil/opt.h" @@ -809,12 +810,12 @@ static void mov_metadata_creation_time(AVDictionary **metadata, int64_t time) { char buffer[32]; if (time) { - struct tm *ptm; + struct tm *ptm, tmbuf; time_t timet; if(time >= 2082844800) time -= 2082844800; /* seconds between 1904-01-01 and Epoch */ timet = time; - ptm = gmtime(&timet); + ptm = gmtime_r(&timet, &tmbuf); if (!ptm) return; if (strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm)) av_dict_set(metadata, "creation_time", buffer, 0); |