rtsp: Avoid a cast when calling strtol
authorMartin Storsjö <martin@martin.st>
Mon, 22 Oct 2012 20:13:49 +0000 (23:13 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 29 Oct 2012 15:47:25 +0000 (17:47 +0200)
This gets rid of this warning:

libavformat/rtsp.c: In function ‘rtsp_parse_transport’:
libavformat/rtsp.c:794: warning: cast discards qualifiers from pointer target type

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtsp.c

index bbe08e6..44de4af 100644 (file)
@@ -765,8 +765,10 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
                     th->lower_transport = RTSP_LOWER_TRANSPORT_UDP_MULTICAST;
             } else if (!strcmp(parameter, "ttl")) {
                 if (*p == '=') {
+                    char *end;
                     p++;
-                    th->ttl = strtol(p, (char **)&p, 10);
+                    th->ttl = strtol(p, &end, 10);
+                    p = end;
                 }
             } else if (!strcmp(parameter, "destination")) {
                 if (*p == '=') {