# HG changeset patch # User michael # Date 1086991396 0 # Node ID 3fc285cdb7914d2c3e07fd613c61a7d8263962cd # Parent ea38edda3c13585da9affa8e77b347528ab4153c user specified start time offset frame dup/drop info typos patch by (Wolfram Gloger ) diff -r ea38edda3c13 -r 3fc285cdb791 utils.c --- 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