mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
Merge commit '851ace79a307bea54b44bd6f7ecd3b7861c28ec6'
* commit '851ace79a307bea54b44bd6f7ecd3b7861c28ec6': wtv: Avoid needlessly calling gmtime twice with the same argument Conflicts: libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
50697ac5b2
@ -389,7 +389,7 @@ static int filetime_to_iso8601(char *buf, int buf_size, int64_t value)
|
||||
struct tm *tm = gmtime(&t);
|
||||
if (!tm)
|
||||
return -1;
|
||||
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", gmtime(&t));
|
||||
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -403,7 +403,7 @@ static int crazytime_to_iso8601(char *buf, int buf_size, int64_t value)
|
||||
struct tm *tm = gmtime(&t);
|
||||
if (!tm)
|
||||
return -1;
|
||||
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", gmtime(&t));
|
||||
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -414,10 +414,10 @@ 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 *result= gmtime(&t);
|
||||
if (!result)
|
||||
struct tm *tm= gmtime(&t);
|
||||
if (!tm)
|
||||
return -1;
|
||||
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", result);
|
||||
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user