1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avformat/matroskadec: Check the return code from strftime()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-10-26 15:51:58 +01:00
parent a9564e859b
commit f0390638e0

View File

@@ -1509,7 +1509,7 @@ static void matroska_metadata_creation_time(AVDictionary **metadata, int64_t dat
time_t creation_time = date_utc / 1000000000 + 978307200;
struct tm *ptm = gmtime(&creation_time);
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);
}