diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-26 04:38:26 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-26 04:38:26 +0300 |
commit | 4a39d4c65a72860873daa433eab077ffcff0f913 (patch) | |
tree | 62a159e840174773f7ca5927066bd4c2c507a0de /libavutil | |
parent | edb069e55689ebff14e689254ce924a30b7bad94 (diff) | |
parent | 82ee7d0dda0fec8cdb670f4e844bf5c2927ad9de (diff) |
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 'libavutil')
-rw-r--r-- | libavutil/parseutils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c index ba4b4e1b72..4708699ccc 100644 --- a/libavutil/parseutils.c +++ b/libavutil/parseutils.c @@ -29,6 +29,7 @@ #include "eval.h" #include "log.h" #include "random_seed.h" +#include "time_internal.h" #include "parseutils.h" #ifdef TEST @@ -552,7 +553,7 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration) const char *p, *q; int64_t t; time_t now; - struct tm dt = { 0 }; + struct tm dt = { 0 }, tmbuf; int today = 0, negative = 0, microseconds = 0; int i; static const char * const date_fmt[] = { @@ -647,7 +648,7 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration) int is_utc = *q == 'Z' || *q == 'z'; q += is_utc; if (today) { /* fill in today's date */ - struct tm dt2 = is_utc ? *gmtime(&now) : *localtime(&now); + struct tm dt2 = is_utc ? *gmtime_r(&now, &tmbuf) : *localtime_r(&now, &tmbuf); dt2.tm_hour = dt.tm_hour; dt2.tm_min = dt.tm_min; dt2.tm_sec = dt.tm_sec; |