mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-12 18:31:37 +00:00
avformat/matroskadec: Check the return code from strftime()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a9564e859b
commit
f0390638e0
@ -1509,8 +1509,8 @@ static void matroska_metadata_creation_time(AVDictionary **metadata, int64_t dat
|
|||||||
time_t creation_time = date_utc / 1000000000 + 978307200;
|
time_t creation_time = date_utc / 1000000000 + 978307200;
|
||||||
struct tm *ptm = gmtime(&creation_time);
|
struct tm *ptm = gmtime(&creation_time);
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int matroska_parse_flac(AVFormatContext *s,
|
static int matroska_parse_flac(AVFormatContext *s,
|
||||||
|
Loading…
Reference in New Issue
Block a user