summaryrefslogtreecommitdiff
path: root/libavformat/mlvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-26 15:51:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-10-26 17:07:29 +0100
commita9564e859bfc49f4fdaf632f51cc6341d2c3fb0a (patch)
treeeaebce476a9b61c4451f4fe771c961a69db266a3 /libavformat/mlvdec.c
parentabaa41b6426c862232977527e783a571fb62645e (diff)
avformat/mlvdec: Check the return code from strftime()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mlvdec.c')
-rw-r--r--libavformat/mlvdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index 1855ea46ce..17bdb17e72 100644
--- a/libavformat/mlvdec.c
+++ b/libavformat/mlvdec.c
@@ -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);