diff options
author | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-03 01:32:13 +0000 |
---|---|---|
committer | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-03 01:32:13 +0000 |
commit | 97afbee906e629505b110060263eb9572cb26cf4 (patch) | |
tree | ec1cde536711adfc2195a1143fa75e748cf670c5 /libmpdemux | |
parent | 89250197603f2293bc642fef0cfaeacf9bf05849 (diff) |
- If fatal error while trying to connect to a WM server, skip other proto.
- Fix that makes mplayer works with corona(WMS9) servers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7253 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/asf_streaming.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libmpdemux/asf_streaming.c b/libmpdemux/asf_streaming.c index e360d9f805..7391607900 100644 --- a/libmpdemux/asf_streaming.c +++ b/libmpdemux/asf_streaming.c @@ -56,18 +56,21 @@ asf_streaming_start( stream_t *stream ) { fd = asf_http_streaming_start( stream ); if( fd!=-1 ) return fd; mp_msg(MSGT_NETWORK,MSGL_V," ===> ASF/HTTP failed\n"); + if( fd==-2 ) return -1; } if( !strncasecmp( proto_s, "mms", 3) && strncasecmp( proto_s, "mmst", 4) ) { mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/UDP...\n"); //fd = asf_mmsu_streaming_start( stream ); if( fd!=-1 ) return fd; mp_msg(MSGT_NETWORK,MSGL_V," ===> ASF/UDP failed\n"); + if( fd==-2 ) return -1; } if( !strncasecmp( proto_s, "mms", 3) ) { mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/TCP...\n"); fd = asf_mmst_streaming_start( stream ); if( fd!=-1 ) return fd; mp_msg(MSGT_NETWORK,MSGL_V," ===> ASF/TCP failed\n"); + if( fd==-2 ) return -1; } mp_msg(MSGT_NETWORK,MSGL_ERR,"Unknown protocol: %s\n", proto_s ); @@ -400,7 +403,10 @@ asf_header_check( HTTP_header_t *http_hdr ) { int asf_http_streaming_type(char *content_type, char *features, HTTP_header_t *http_hdr ) { if( content_type==NULL ) return ASF_Unknown_e; - if( !strcasecmp(content_type, "application/octet-stream") ) { + if( !strcasecmp(content_type, "application/octet-stream") || + !strcasecmp(content_type, "application/vnd.ms.wms-hdr.asfv1") || // New in Corona, first request + !strcasecmp(content_type, "application/x-mms-framed") ) { // New in Corana, second request + if( features==NULL ) { mp_msg(MSGT_NETWORK,MSGL_V,"=====> ASF Prerecorded\n"); return ASF_Prerecorded_e; @@ -637,7 +643,7 @@ asf_http_streaming_start( stream_t *stream ) { if( url->port==0 ) url->port = 80; } fd = connect2Server( url->hostname, url->port ); - if( fd<0 ) return -1; + if( fd<0 ) return fd; http_hdr = asf_http_request( stream->streaming_ctrl ); mp_msg(MSGT_NETWORK,MSGL_DBG2,"Request [%s]\n", http_hdr->buffer ); |