aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/wtvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-26 02:21:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-26 02:21:42 +0200
commit50697ac5b2e7151b7e29299a5e36aef17695f9c4 (patch)
tree64e49705804313d7b4f99e9f9296de52fc8cedee /libavformat/wtvdec.c
parent90bf1e3046000def2142e06c9f084b7542256804 (diff)
parent851ace79a307bea54b44bd6f7ecd3b7861c28ec6 (diff)
downloadffmpeg-50697ac5b2e7151b7e29299a5e36aef17695f9c4.tar.gz
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>
Diffstat (limited to 'libavformat/wtvdec.c')
-rw-r--r--libavformat/wtvdec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index ee1ae1ab19..5012890ef3 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -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;
}