On Tue, 24 May 2011, Anton Khirnov wrote:

> From: Ilya <[email protected]>
> 
> strtol could return negative values, leading to various error messages,
> mainly "non-monotonically increasing dts".
> 
> Signed-off-by: Anton Khirnov <[email protected]>
> ---
>  libavformat/rtsp.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> index 2ebf7e0..2d1438d 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';
> -- 
> 1.7.5.1

Looks good to me

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to