diff options
author | Ilya <ilyaDOTilba@gmail.com> | 2011-03-26 17:13:36 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-05-24 19:11:28 +0200 |
commit | 4515f9b58a51eb0af81c1ed1fd99889fcdc5ae91 (patch) | |
tree | 5c15034076512bd6ea60a382a3a021870678afc4 /libavformat/rtsp.c | |
parent | d980d7b1295290cedd978ef53118513838aa1484 (diff) | |
download | ffmpeg-4515f9b58a51eb0af81c1ed1fd99889fcdc5ae91.tar.gz |
rtsp: use strtoul to parse rtptime and seq values.
strtol could return negative values, leading to various error messages,
mainly "non-monotonically increasing dts".
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 2ebf7e0510..2d1438d3ed 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -744,9 +744,9 @@ static void rtsp_parse_rtp_info(RTSPState *rt, const char *p) if (!strcmp(key, "url")) av_strlcpy(url, value, sizeof(url)); else if (!strcmp(key, "seq")) - seq = strtol(value, NULL, 10); + seq = strtoul(value, NULL, 10); else if (!strcmp(key, "rtptime")) - rtptime = strtol(value, NULL, 10); + rtptime = strtoul(value, NULL, 10); if (*p == ',') { handle_rtp_info(rt, url, seq, rtptime); url[0] = '\0'; |