diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-11-02 20:17:25 +0100 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-11-06 11:52:57 +0200 |
commit | bb3244dee26e3c500b14830e9500cb2d3658f809 (patch) | |
tree | 197235a2c136636ffbeab1464e51a87963ea6e36 /libavformat/rtsp.c | |
parent | ba04ecfdacec4cf86e74b43fe8bcc09e06bb7a72 (diff) | |
download | ffmpeg-bb3244dee26e3c500b14830e9500cb2d3658f809.tar.gz |
Replace all usage of strcasecmp/strncasecmp
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: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index b9f340d7b1..c673c35572 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -34,7 +34,6 @@ #if HAVE_POLL_H #include <poll.h> #endif -#include <strings.h> #include "internal.h" #include "network.h" #include "os_support.h" @@ -661,7 +660,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> */ @@ -670,14 +669,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; @@ -1556,7 +1555,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); |