summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-05-29 17:16:15 +0000
committerbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-05-29 17:16:15 +0000
commitc2ad4c35ebdc6f5164ff80f908f4d361406ca2c4 (patch)
tree7fbbc1967c2b4ab8d347f57e9dea4dc781bc9b0d /mplayer.c
parente244354ce3c207927211df3d5d2b26100dbe5066 (diff)
downloadmpv-c2ad4c35ebdc6f5164ff80f908f4d361406ca2c4.tar.bz2
mpv-c2ad4c35ebdc6f5164ff80f908f4d361406ca2c4.tar.xz
Changed streaming functions call.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@907 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/mplayer.c b/mplayer.c
index 4b50d6c1d2..342ec4ef5a 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -657,8 +657,9 @@ if(vcd_track){
stream=new_stream(f,STREAMTYPE_STREAM);
} else {
#ifdef STREAMING
- url = set_url(filename);
+ url = url_new(filename);
if(url==NULL) {
+ // failed to create a new URL, so it's not an URL (or a malformed URL)
#endif
f=open(filename,O_RDONLY);
if(f<0){ printf("File not found: '%s'\n",filename);return 1; }
@@ -667,18 +668,15 @@ if(vcd_track){
stream->end_pos=len;
#ifdef STREAMING
} else {
- if(url->port==0) {
- if( (!strcasecmp(url->protocol, "mms")) ||
- (!strcasecmp(url->protocol, "http")) ){
- url->port=80;
- }
- }
- f=connect2Server(url->hostname, url->port);
- if( f<0 ) {
+ int streaming_protocol;
+ streaming_protocol=autodetectProtocol( url, &f );
+ if( streaming_protocol==STREAMING_TYPE_UNKNOWN ) {
printf("Unable to open URL: %s\n", filename);
- free_url(url);
+ url_free(url);
return 1;
} else {
+ f=streaming_start( &url, f, streaming_protocol );
+ if(f<0){ printf("Unable to open URL: %s\n", url->url); return 1; }
printf("Connected to server: %s\n", url->hostname );
}
stream=new_stream(f,STREAMTYPE_STREAM);