diff options
author | Francesco Cosoleto <cosoleto@gmail.com> | 2009-02-08 22:03:54 +0000 |
---|---|---|
committer | Robert Swain <robert.swain@gmail.com> | 2009-02-08 22:03:54 +0000 |
commit | ced06bd8fe152e00aaa5552480a606287844fc65 (patch) | |
tree | 350d0b546eb6fe151b4193da1ad600f5a2fef5d5 /libavformat/utils.c | |
parent | f9e5b9420ea6355b4ae466eb155f6f2abd929393 (diff) | |
download | ffmpeg-ced06bd8fe152e00aaa5552480a606287844fc65.tar.gz |
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
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 4f098d9344..417a7e35e8 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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); |