summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-11-02 20:17:25 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-11-03 19:25:26 +0100
commit96949dafcca87f65902bd77a0bc56007d9cead70 (patch)
treee394623e56efc86b70d3e7fbdefc2555457b3aa3 /libavformat/rtsp.c
parent475fb67d0b391ad1e8e3e8e3d65d7e6892e17e7a (diff)
Replace all strcasecmp/strncasecmp usages.
All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index a80a9da7bf..5966e813b7 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -33,7 +33,6 @@
#if HAVE_POLL_H
#include <poll.h>
#endif
-#include <strings.h>
#include "internal.h"
#include "network.h"
#include "os_support.h"
@@ -660,7 +659,7 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
get_word_sep(transport_protocol, sizeof(transport_protocol),
"/", &p);
- if (!strcasecmp (transport_protocol, "rtp")) {
+ if (!av_strcasecmp (transport_protocol, "rtp")) {
get_word_sep(profile, sizeof(profile), "/;,", &p);
lower_transport[0] = '\0';
/* rtp/avp/<protocol> */
@@ -669,14 +668,14 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
";,", &p);
}
th->transport = RTSP_TRANSPORT_RTP;
- } else if (!strcasecmp (transport_protocol, "x-pn-tng") ||
- !strcasecmp (transport_protocol, "x-real-rdt")) {
+ } else if (!av_strcasecmp (transport_protocol, "x-pn-tng") ||
+ !av_strcasecmp (transport_protocol, "x-real-rdt")) {
/* x-pn-tng/<protocol> */
get_word_sep(lower_transport, sizeof(lower_transport), "/;,", &p);
profile[0] = '\0';
th->transport = RTSP_TRANSPORT_RDT;
}
- if (!strcasecmp(lower_transport, "TCP"))
+ if (!av_strcasecmp(lower_transport, "TCP"))
th->lower_transport = RTSP_LOWER_TRANSPORT_TCP;
else
th->lower_transport = RTSP_LOWER_TRANSPORT_UDP;
@@ -1555,7 +1554,7 @@ redirect:
if (rt->server_type != RTSP_SERVER_REAL && reply->real_challenge[0]) {
rt->server_type = RTSP_SERVER_REAL;
continue;
- } else if (!strncasecmp(reply->server, "WMServer/", 9)) {
+ } else if (!av_strncasecmp(reply->server, "WMServer/", 9)) {
rt->server_type = RTSP_SERVER_WMS;
} else if (rt->server_type == RTSP_SERVER_REAL)
strcpy(real_challenge, reply->real_challenge);