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; }