[FFmpeg-devel] [PATCH 12/12] ffmpeg: remove hardcoded 'now' creation_time support
Marton Balint
cus at passwd.hu
Sun Feb 14 03:01:55 CET 2016
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?
Thanks,
Marton
More information about the ffmpeg-devel
mailing list