diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-25 16:55:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-25 16:55:31 +0200 |
commit | a6ff8514a9bdc93739a73d28913c6b457baff32d (patch) | |
tree | ed4f3c885586b33b7d8229e606acc80cd8c8ca50 /libavformat | |
parent | fec512a52cdd1bab84958474cc160fdb7be81dec (diff) | |
parent | dc5385806339f90b4eb074d9002205ebb4010cc2 (diff) | |
download | ffmpeg-a6ff8514a9bdc93739a73d28913c6b457baff32d.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
wtv: Check the return value from gmtime
x86: fft: convert sse inline asm to yasm
x86: place some inline asm under #if HAVE_INLINE_ASM
Conflicts:
libavcodec/x86/fft_sse.c
libavformat/wtv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/wtvdec.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 9157042d08..338eff8bfb 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -372,7 +372,11 @@ static int read_probe(AVProbeData *p) static void filetime_to_iso8601(char *buf, int buf_size, int64_t value) { time_t t = (value / 10000000LL) - 11644473600LL; - strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", gmtime(&t)); + struct tm *tm = gmtime(&t); + if (tm) + strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", gmtime(&t)); + else + buf[0] = '\0'; } /** @@ -381,7 +385,11 @@ static void filetime_to_iso8601(char *buf, int buf_size, int64_t value) static void crazytime_to_iso8601(char *buf, int buf_size, int64_t value) { time_t t = (value / 10000000LL) - 719162LL*86400LL; - strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", gmtime(&t)); + struct tm *tm = gmtime(&t); + if (tm) + strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", gmtime(&t)); + else + buf[0] = '\0'; } /** |