mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 15:11:09 +08:00
Checked if the connection succeeded before writing in the socket.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7251 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
@@ -513,11 +513,19 @@ int asf_mmst_streaming_start(stream_t *stream)
|
||||
URL_t *url1 = stream->streaming_ctrl->url;
|
||||
int s = stream->fd;
|
||||
|
||||
if( s>0 ) {
|
||||
close( stream->fd );
|
||||
stream->fd = -1;
|
||||
}
|
||||
|
||||
/* parse url */
|
||||
path = strchr(url1->file,'/') + 1;
|
||||
|
||||
url1->port=1755;
|
||||
s = connect2Server( url1->hostname, url1->port );
|
||||
if( s<0 ) {
|
||||
return s;
|
||||
}
|
||||
printf ("connected\n");
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user