diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-26 18:55:20 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-26 18:55:20 +0000 |
commit | bc7eccf0f195865aa6d3557583dc8761802f11ac (patch) | |
tree | 7c9a19e374ac5faf8c9b2a51416ade6358ec60ff | |
parent | 58eab3c0548b2b198799457d991c86352400b5e7 (diff) |
strncasecmp is not necessary and e.g. strncasecmp(prot, "mms", 3) will
also match e.g. mmshttp!
Thanks to Ian Remmler for noticing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16113 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/asf_streaming.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpdemux/asf_streaming.c b/libmpdemux/asf_streaming.c index 61c3b3ad3a..197ed9faf3 100644 --- a/libmpdemux/asf_streaming.c +++ b/libmpdemux/asf_streaming.c @@ -51,7 +51,7 @@ static int asf_streaming_start( stream_t *stream, int *demuxer_type) { int port = stream->streaming_ctrl->url->port; // Is protocol mms or mmsu? - if (!strncasecmp(proto, "mmsu", 4) || !strncasecmp(proto, "mms", 3)) + if (!strcasecmp(proto, "mmsu") || !strcasecmp(proto, "mms")) { mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/UDP...\n"); //fd = asf_mmsu_streaming_start( stream ); @@ -61,7 +61,7 @@ static int asf_streaming_start( stream_t *stream, int *demuxer_type) { } //Is protocol mms or mmst? - if (!strncasecmp(proto, "mmst", 4) || !strncasecmp(proto, "mms", 3)) + if (!strcasecmp(proto, "mmst") || !strcasecmp(proto, "mms")) { mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/TCP...\n"); fd = asf_mmst_streaming_start( stream ); @@ -72,8 +72,8 @@ static int asf_streaming_start( stream_t *stream, int *demuxer_type) { } //Is protocol http, http_proxy, or mms? - if (!strncasecmp(proto, "http_proxy", 10) || !strncasecmp(proto, "http", 4) || - !strncasecmp(proto, "mms", 3) || !strncasecmp(proto, "mmshttp", 7)) + if (!strcasecmp(proto, "http_proxy") || !strcasecmp(proto, "http") || + !strcasecmp(proto, "mms") || !strcasecmp(proto, "mmshttp")) { mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/HTTP...\n"); fd = asf_http_streaming_start( stream, demuxer_type ); |