aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-26 15:52:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-10-26 17:07:29 +0100
commitc0002ddb019d7f2f22da301b2855f86d697d37bd (patch)
tree68244e40d6099e37ecb7a1831ce23e1509302966
parentf0390638e0e13436629e0297b1aa5bbc058cda2f (diff)
downloadffmpeg-c0002ddb019d7f2f22da301b2855f86d697d37bd.tar.gz
ffmpeg_opt: Check the return code from strftime()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg_opt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 7a5eaa5b2f..27e08902d6 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -509,7 +509,8 @@ static int opt_recording_timestamp(void *optctx, const char *opt, const char *ar
char buf[128];
int64_t recording_timestamp = parse_time_or_die(opt, arg, 0) / 1E6;
struct tm time = *gmtime((time_t*)&recording_timestamp);
- strftime(buf, sizeof(buf), "creation_time=%FT%T%z", &time);
+ if (!strftime(buf, sizeof(buf), "creation_time=%FT%T%z", &time))
+ return -1;
parse_option(o, "metadata", buf, options);
av_log(NULL, AV_LOG_WARNING, "%s is deprecated, set the 'creation_time' metadata "