diff options
author | Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> | 2004-06-11 22:03:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-06-11 22:03:16 +0000 |
commit | a6a92a9aa633b82ce71474a94fe976fad98a4de8 (patch) | |
tree | 027a729bf75bdd98e894ef3a7dc201000fbc9d2a /libavformat/utils.c | |
parent | dbc56b3914cc70e763e902c382065ab09ee6bf1f (diff) | |
download | ffmpeg-a6a92a9aa633b82ce71474a94fe976fad98a4de8.tar.gz |
user specified start time offset
frame dup/drop info
typos
patch by (Wolfram Gloger <wmglo at dent dot med dot uni-muenchen dot de>)
Originally committed as revision 3217 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 0c112b9cad..4e75bc157d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1009,7 +1009,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts 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 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts 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 @@ int64_t parse_date(const char *datestr, int duration) const char *q; int is_utc, len; char lastch; + int negative = 0; #undef time time_t now = time(0); @@ -2273,6 +2274,10 @@ int64_t parse_date(const char *datestr, int duration) } } } 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 @@ int64_t parse_date(const char *datestr, int duration) } t += val; } - return t; + return negative ? -t : t; } /* syntax: '?tag1=val1&tag2=val2...'. Little URL decoding is done. Return |