aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-04-25 23:37:29 +0100
committerMans Rullgard <mans@mansr.com>2012-05-06 12:04:25 +0100
commitddce7dabd2dcabac1655e76901192ae6aedecb69 (patch)
treec997bb89638b9311d370e0ae842510c84b98de5e /libavformat
parent0de1319ee0109facefe9804ffe0f0d0df36b27ad (diff)
downloadffmpeg-ddce7dabd2dcabac1655e76901192ae6aedecb69.tar.gz
rtsp: avoid const warnings from strtol() call
The strtol() interface makes it difficult to use with const-qualified pointers. With this change, although the const is still lost, the compiler does not warn about it. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 9ee7a758e4..2ad2c4dcf2 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -637,16 +637,17 @@ static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
#if CONFIG_RTSP_DEMUXER || CONFIG_RTSP_MUXER
static void rtsp_parse_range(int *min_ptr, int *max_ptr, const char **pp)
{
- const char *p;
+ const char *q;
+ char *p;
int v;
- p = *pp;
- p += strspn(p, SPACE_CHARS);
- v = strtol(p, (char **)&p, 10);
+ q = *pp;
+ q += strspn(q, SPACE_CHARS);
+ v = strtol(q, &p, 10);
if (*p == '-') {
p++;
*min_ptr = v;
- v = strtol(p, (char **)&p, 10);
+ v = strtol(p, &p, 10);
*max_ptr = v;
} else {
*min_ptr = v;