Mercurial > mplayer.hg
diff libmpdemux/network.c @ 3453:10577da4a7b1
Added a data field in the streaming_ctrl_t struct, to store any
kind of data that the protocol need to keep track of.
author | bertrand |
---|---|
date | Tue, 11 Dec 2001 01:06:08 +0000 |
parents | 1c2fb4764745 |
children | fb9de639ed30 |
line wrap: on
line diff
--- a/libmpdemux/network.c Mon Dec 10 22:53:24 2001 +0000 +++ b/libmpdemux/network.c Tue Dec 11 01:06:08 2001 +0000 @@ -152,6 +152,7 @@ return -1; } + if( url->port==0 ) url->port = 80; fd = connect2Server( url->hostname, url->port ); if( fd<0 ) { return -1; @@ -228,7 +229,7 @@ // Look for the extension in the extensions table for( i=0 ; i<(sizeof(extensions_table)/sizeof(extensions_table[0])) ; i++ ) { if( !strcasecmp(extension, extensions_table[i].extension) ) { - if( url->port==0 ) url->port = 80; + //if( url->port==0 ) url->port = 80; return extensions_table[i].demuxer_type; } } @@ -241,8 +242,8 @@ } // Checking for ASF - if( !strcasecmp(url->protocol, "mms") ) { - if( url->port==0 ) url->port = 80; + if( !strncasecmp(url->protocol, "mms", 3) ) { + //if( url->port==0 ) url->port = 80; return DEMUXER_TYPE_ASF; } @@ -309,6 +310,9 @@ http_free( http_hdr ); return DEMUXER_TYPE_UNKNOWN; } + } else { + printf("Unknown protocol '%s'\n", url->protocol ); + return DEMUXER_TYPE_UNKNOWN; } } while( redirect );