Commit 4515f9b5 authored by Ilya's avatar Ilya Committed by Anton Khirnov

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: 's avatarAnton Khirnov <anton@khirnov.net>
parent d980d7b1
...@@ -744,9 +744,9 @@ static void rtsp_parse_rtp_info(RTSPState *rt, const char *p) ...@@ -744,9 +744,9 @@ static void rtsp_parse_rtp_info(RTSPState *rt, const char *p)
if (!strcmp(key, "url")) if (!strcmp(key, "url"))
av_strlcpy(url, value, sizeof(url)); av_strlcpy(url, value, sizeof(url));
else if (!strcmp(key, "seq")) else if (!strcmp(key, "seq"))
seq = strtol(value, NULL, 10); seq = strtoul(value, NULL, 10);
else if (!strcmp(key, "rtptime")) else if (!strcmp(key, "rtptime"))
rtptime = strtol(value, NULL, 10); rtptime = strtoul(value, NULL, 10);
if (*p == ',') { if (*p == ',') {
handle_rtp_info(rt, url, seq, rtptime); handle_rtp_info(rt, url, seq, rtptime);
url[0] = '\0'; url[0] = '\0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment