# HG changeset patch # User reimar # Date 1122404120 0 # Node ID 0aeb954fc11c429e539529e6d97855f7ee8cb67a # Parent 5683110fce0a95cecd903d04858190df650681c6 strncasecmp is not necessary and e.g. strncasecmp(prot, "mms", 3) will also match e.g. mmshttp! Thanks to Ian Remmler for noticing. diff -r 5683110fce0a -r 0aeb954fc11c libmpdemux/asf_streaming.c --- a/libmpdemux/asf_streaming.c Tue Jul 26 18:28:51 2005 +0000 +++ b/libmpdemux/asf_streaming.c Tue Jul 26 18:55:20 2005 +0000 @@ -51,7 +51,7 @@ 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 @@ } //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 @@ } //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 );