[FFmpeg-devel] [PATCH 12/12] ffmpeg: remove hardcoded 'now' creation_time support

Marton Balint cus at passwd.hu
Sat Feb 6 20:13:23 CET 2016


Every date parsing routine now uses av_parse_time which handles 'now' and
provides greater precision as well. This change also enables the segmenter
muxer to set the proper 'now' creation time at the beginning of each segment.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 ffmpeg_opt.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 669976b..7451e21 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -2430,17 +2430,6 @@ loop_end:
         }
         *val++ = 0;
 
-        if (!strcmp(o->metadata[i].u.str, "creation_time") &&
-            !strcmp(val, "now")) {
-            time_t now = time(0);
-            struct tm *ptm, tmbuf;
-            ptm = localtime_r(&now, &tmbuf);
-            if (ptm) {
-                if (strftime(now_time, sizeof(now_time), "%Y-%m-%d %H:%M:%S", ptm))
-                    val = now_time;
-            }
-        }
-
         parse_meta_type(o->metadata[i].specifier, &type, &index, &stream_spec);
         if (type == 's') {
             for (j = 0; j < oc->nb_streams; j++) {
-- 
2.6.2



More information about the ffmpeg-devel mailing list