avformat/mlvdec: 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:37 +01:00
parent abaa41b642
commit a9564e859b
1 changed files with 2 additions and 2 deletions

View File

@ -204,8 +204,8 @@ static int scan_file(AVFormatContext *avctx, AVStream *vst, AVStream *ast, int f
time.tm_yday = avio_rl16(pb); time.tm_yday = avio_rl16(pb);
time.tm_isdst = avio_rl16(pb); time.tm_isdst = avio_rl16(pb);
avio_skip(pb, 2); avio_skip(pb, 2);
strftime(str, sizeof(str), "%Y-%m-%d %H:%M:%S", &time); if (strftime(str, sizeof(str), "%Y-%m-%d %H:%M:%S", &time))
av_dict_set(&avctx->metadata, "time", str, 0); av_dict_set(&avctx->metadata, "time", str, 0);
size -= 20; size -= 20;
} else if (type == MKTAG('E','X','P','O') && size >= 16) { } else if (type == MKTAG('E','X','P','O') && size >= 16) {
av_dict_set(&avctx->metadata, "isoMode", avio_rl32(pb) ? "auto" : "manual", 0); av_dict_set(&avctx->metadata, "isoMode", avio_rl32(pb) ? "auto" : "manual", 0);