Mercurial > libavformat.hg
diff utils.c @ 4420:14797a347fcb libavformat
Add the ability to set the timestamp to the current time by specifying 'now'
as the time
Patch by Francesco Cosoleto ( cosoleto gmail com )
author | superdump |
---|---|
date | Sun, 08 Feb 2009 22:03:54 +0000 |
parents | 146d6083662b |
children | fc705c33843f |
line wrap: on
line diff
--- a/utils.c Sun Feb 08 21:42:06 2009 +0000 +++ b/utils.c Sun Feb 08 22:03:54 2009 +0000 @@ -2908,6 +2908,9 @@ p = datestr; q = NULL; if (!duration) { + if (!strncasecmp(datestr, "now", len)) + return (int64_t) now * 1000000; + /* parse the year-month-day part */ for (i = 0; i < FF_ARRAY_ELEMS(date_fmt); i++) { q = small_strptime(p, date_fmt[i], &dt);