[FFmpeg-devel] [PATCH 12/12] ffmpeg: remove hardcoded 'now' creation_time support
Michael Niedermayer
michael at niedermayer.cc
Mon Feb 22 00:57:38 CET 2016
On Sun, Feb 14, 2016 at 03:01:55AM +0100, Marton Balint wrote:
>
> On Sat, 6 Feb 2016, Marton Balint wrote:
>
> >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;
> >- }
> >- }
> >-
>
> Like I mentioned, this change causes the existing muxers which
> blindly write all metadata as string to write "now" into
> creation_time if -metadata creation_time=now is specified as an
> option.
>
> Is this acceptable?
>
> The muxers affected (assuming I did the grep right):
>
> caf
> flv
> id3v2
> lrc
> nut
> smjpeg
> wtv
>
> If it is not acceptable then would it be OK to introduce an avformat
> flag which signals that the format needs creation_time strings
> parsed?
i would say, if thats needed then yes
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160222/f600e855/attachment.sig>
More information about the ffmpeg-devel
mailing list