Add the ability to set the timestamp to the current time by specifying 'now'
as the time Patch by Francesco Cosoleto ( cosoleto gmail com ) Originally committed as revision 17076 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:

committed by
Robert Swain

parent
f9e5b9420e
commit
ced06bd8fe
@@ -2908,6 +2908,9 @@ int64_t parse_date(const char *datestr, int duration)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user