Commit 3b709fd9 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '9dcf2397'

* commit '9dcf2397':
  lavf: Check the return value of strftime

Conflicts:
	libavformat/wtvdec.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 50697ac5 9dcf2397
...@@ -816,8 +816,8 @@ static void mov_metadata_creation_time(AVDictionary **metadata, int64_t time) ...@@ -816,8 +816,8 @@ static void mov_metadata_creation_time(AVDictionary **metadata, int64_t time)
timet = time; timet = time;
ptm = gmtime(&timet); ptm = gmtime(&timet);
if (!ptm) return; if (!ptm) return;
strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm); if (strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", ptm))
av_dict_set(metadata, "creation_time", buffer, 0); av_dict_set(metadata, "creation_time", buffer, 0);
} }
} }
......
...@@ -1877,7 +1877,8 @@ static int mxf_timestamp_to_str(uint64_t timestamp, char **str) ...@@ -1877,7 +1877,8 @@ static int mxf_timestamp_to_str(uint64_t timestamp, char **str)
*str = av_mallocz(32); *str = av_mallocz(32);
if (!*str) if (!*str)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
strftime(*str, 32, "%Y-%m-%d %H:%M:%S", &time); if (!strftime(*str, 32, "%Y-%m-%d %H:%M:%S", &time))
str[0] = '\0';
return 0; return 0;
} }
......
...@@ -389,7 +389,8 @@ static int filetime_to_iso8601(char *buf, int buf_size, int64_t value) ...@@ -389,7 +389,8 @@ static int filetime_to_iso8601(char *buf, int buf_size, int64_t value)
struct tm *tm = gmtime(&t); struct tm *tm = gmtime(&t);
if (!tm) if (!tm)
return -1; return -1;
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm); if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
return -1;
return 0; return 0;
} }
...@@ -403,7 +404,8 @@ static int crazytime_to_iso8601(char *buf, int buf_size, int64_t value) ...@@ -403,7 +404,8 @@ static int crazytime_to_iso8601(char *buf, int buf_size, int64_t value)
struct tm *tm = gmtime(&t); struct tm *tm = gmtime(&t);
if (!tm) if (!tm)
return -1; return -1;
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm); if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
return -1;
return 0; return 0;
} }
...@@ -417,7 +419,8 @@ static int oledate_to_iso8601(char *buf, int buf_size, int64_t value) ...@@ -417,7 +419,8 @@ static int oledate_to_iso8601(char *buf, int buf_size, int64_t value)
struct tm *tm= gmtime(&t); struct tm *tm= gmtime(&t);
if (!tm) if (!tm)
return -1; return -1;
strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm); if (!strftime(buf, buf_size, "%Y-%m-%d %H:%M:%S", tm))
return -1;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment