ffmpeg_opt: expand format for strftime
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Tue, 20 Jan 2015 21:33:00 +0000 (22:33 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 24 Jan 2015 12:05:15 +0000 (13:05 +0100)
While the shortened format specifiers are valid C99 ones, they are
not supported by e.g. some Visual Studio runtimes (and thus mingw).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_opt.c

index a0c977b..9fe54ff 100644 (file)
@@ -519,7 +519,7 @@ 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);
-    if (!strftime(buf, sizeof(buf), "creation_time=%FT%T%z", &time))
+    if (!strftime(buf, sizeof(buf), "creation_time=%Y-%m-%dT%H:%M:%S%z", &time))
         return -1;
     parse_option(o, "metadata", buf, options);