From: Ilya Date: Sat, 26 Mar 2011 16:13:36 +0000 (+0100) Subject: rtsp: use strtoul to parse rtptime and seq values. X-Git-Tag: v0.7rc1~352 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4515f9b58a51eb0af81c1ed1fd99889fcdc5ae91;p=coroid%2Flibav_saccubus.git 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 --- diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 2ebf7e051..2d1438d3e 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';