diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2007-09-19 12:38:07 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2007-09-19 12:38:07 +0000 |
commit | f94361612a69bea8afb4dde4c17a98f8fd915244 (patch) | |
tree | 47731875dd54268671016b5c5387e5a2ae425580 /ffserver.c | |
parent | 4ec45764a09b78e556e10cd65f2d2f5a57900990 (diff) | |
download | ffmpeg-f94361612a69bea8afb4dde4c17a98f8fd915244.tar.gz |
Make parse_date return INT64_MIN in case of unparsable input.
Patch by Stefano Sabatini: [stefano sabatini-lala poste it]
Original thread:
[FFmpeg-devel] [PATCH] Enhace documentation forlibavformat/utils.c:parse_date
Date: 08/17/2007 09:40 PM
Originally committed as revision 10533 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ffserver.c b/ffserver.c index 96eb4fe0fa..90bc908973 100644 --- a/ffserver.c +++ b/ffserver.c @@ -1887,7 +1887,11 @@ static int open_input_stream(HTTPContext *c, const char *info) buf_size = FFM_PACKET_SIZE; /* compute position (absolute time) */ if (find_info_tag(buf, sizeof(buf), "date", info)) + { stream_pos = parse_date(buf, 0); + if (stream_pos == INT64_MIN) + return -1; + } else if (find_info_tag(buf, sizeof(buf), "buffer", info)) { int prebuffer = strtol(buf, 0, 10); stream_pos = av_gettime() - prebuffer * (int64_t)1000000; @@ -1898,7 +1902,11 @@ static int open_input_stream(HTTPContext *c, const char *info) buf_size = 0; /* compute position (relative time) */ if (find_info_tag(buf, sizeof(buf), "date", info)) + { stream_pos = parse_date(buf, 1); + if (stream_pos == INT64_MIN) + return -1; + } else stream_pos = 0; } |