[FFmpeg-cvslog] ffmpeg: remove hardcoded 'now' creation_time support

Marton Balint git at videolan.org
Thu Mar 3 01:52:37 CET 2016


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Feb  6 18:05:37 2016 +0100| [0418b0253aa1cff9b9ba6fc412371457d168fde9] | committer: Marton Balint

ffmpeg: remove hardcoded 'now' creation_time support

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>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0418b0253aa1cff9b9ba6fc412371457d168fde9
---

 ffmpeg_opt.c |   13 -------------
 1 file changed, 13 deletions(-)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index edbc4a0..00d91c8 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -40,7 +40,6 @@
 #include "libavutil/parseutils.h"
 #include "libavutil/pixdesc.h"
 #include "libavutil/pixfmt.h"
-#include "libavutil/time_internal.h"
 
 #define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass"
 
@@ -2430,7 +2429,6 @@ loop_end:
         char type, *val;
         const char *stream_spec;
         int index = 0, j, ret = 0;
-        char now_time[256];
 
         val = strchr(o->metadata[i].u.str, '=');
         if (!val) {
@@ -2440,17 +2438,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++) {



More information about the ffmpeg-cvslog mailing list