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/wtvdec.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/wtvdec.c')
-rw-r--r-- | libavformat/wtvdec.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index de3c93158c..4009964824 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -30,6 +30,7 @@ #include "libavutil/channel_layout.h" #include "libavutil/intreadwrite.h" #include "libavutil/intfloat.h" +#include "libavutil/time_internal.h" #include "avformat.h" #include "internal.h" #include "wtv.h" @@ -386,7 +387,8 @@ static int read_probe(AVProbeData *p) static int filetime_to_iso8601(char *buf, int buf_size, int64_t value) { time_t t = (value / 10000000LL) - 11644473600LL; - struct tm *tm = gmtime(&t); + struct tm tmbuf; + struct tm *tm = gmtime_r(&t, &tmbuf); if (!tm) return -1; if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm)) @@ -401,7 +403,8 @@ static int filetime_to_iso8601(char *buf, int buf_size, int64_t value) static int crazytime_to_iso8601(char *buf, int buf_size, int64_t value) { time_t t = (value / 10000000LL) - 719162LL*86400LL; - struct tm *tm = gmtime(&t); + struct tm tmbuf; + struct tm *tm = gmtime_r(&t, &tmbuf); if (!tm) return -1; if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm)) @@ -416,7 +419,8 @@ static int crazytime_to_iso8601(char *buf, int buf_size, int64_t value) static int oledate_to_iso8601(char *buf, int buf_size, int64_t value) { time_t t = (av_int2double(value) - 25569.0) * 86400; - struct tm *tm= gmtime(&t); + struct tm tmbuf; + struct tm *tm= gmtime_r(&t, &tmbuf); if (!tm) return -1; if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm)) |