[FFmpeg-cvslog] avformat/mlvdec: Check the return code from strftime()
Michael Niedermayer
git at videolan.org
Sun Oct 26 17:08:17 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 26 15:51:37 2014 +0100| [a9564e859bfc49f4fdaf632f51cc6341d2c3fb0a] | committer: Michael Niedermayer
avformat/mlvdec: Check the return code from strftime()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a9564e859bfc49f4fdaf632f51cc6341d2c3fb0a
---
libavformat/mlvdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index 1855ea4..17bdb17 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);
More information about the ffmpeg-cvslog
mailing list