changeset 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 24d2dfc9086d
children a6849222fccc
files utils.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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);