Commit a9564e85 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent abaa41b6
......@@ -204,8 +204,8 @@ static int scan_file(AVFormatContext *avctx, AVStream *vst, AVStream *ast, int f
time.tm_yday = avio_rl16(pb);
time.tm_isdst = avio_rl16(pb);
avio_skip(pb, 2);
strftime(str, sizeof(str), "%Y-%m-%d %H:%M:%S", &time);
av_dict_set(&avctx->metadata, "time", str, 0);
if (strftime(str, sizeof(str), "%Y-%m-%d %H:%M:%S", &time))
av_dict_set(&avctx->metadata, "time", str, 0);
size -= 20;
} else if (type == MKTAG('E','X','P','O') && size >= 16) {
av_dict_set(&avctx->metadata, "isoMode", avio_rl32(pb) ? "auto" : "manual", 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