changeset 477:3fc285cdb791 libavformat

user specified start time offset frame dup/drop info typos patch by (Wolfram Gloger <wmglo at dent dot med dot uni-muenchen dot de>)
author michael
date Fri, 11 Jun 2004 22:03:16 +0000
parents ea38edda3c13
children ac85aafd0971
files utils.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Thu Jun 10 14:08:57 2004 +0000
+++ b/utils.c	Fri Jun 11 22:03:16 2004 +0000
@@ -1009,7 +1009,7 @@
             pos_min= e->pos;
             ts_min= e->timestamp;
 #ifdef DEBUG_SEEK
-        av_log(s, AV_LOG_DEBUG, "unsing cached pos_min=0x%llx dts_min=%lld\n", 
+        av_log(s, AV_LOG_DEBUG, "using cached pos_min=0x%llx dts_min=%lld\n", 
                pos_min,ts_min);
 #endif
         }else{
@@ -1023,7 +1023,7 @@
             ts_max= e->timestamp;
             pos_limit= pos_max - e->min_distance;
 #ifdef DEBUG_SEEK
-        av_log(s, AV_LOG_DEBUG, "unsing cached pos_max=0x%llx pos_limit=0x%llx dts_max=%lld\n", 
+        av_log(s, AV_LOG_DEBUG, "using cached pos_max=0x%llx pos_limit=0x%llx dts_max=%lld\n", 
                pos_max,pos_limit, ts_max);
 #endif
         }
@@ -2229,6 +2229,7 @@
     const char *q;
     int is_utc, len;
     char lastch;
+    int negative = 0;
 
 #undef time
     time_t now = time(0);
@@ -2273,6 +2274,10 @@
             }
         }
     } else {
+	if (p[0] == '-') {
+	    negative = 1;
+	    ++p;
+	}
         q = small_strptime(p, time_fmt[0], &dt);
         if (!q) {
             dt.tm_sec = strtol(p, (char **)&q, 10);
@@ -2312,7 +2317,7 @@
         }
         t += val;
     }
-    return t;
+    return negative ? -t : t;
 }
 
 /* syntax: '?tag1=val1&tag2=val2...'. Little URL decoding is done. Return