aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
authorGravatar bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-09-03 01:25:31 +0000
committerGravatar bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-09-03 01:25:31 +0000
commitc5cc04f2c85aacb57aca118fdc2e1092ee7207e2 (patch)
treedb0916cc32479947ef261e119c254ab5106cabc8 /libmpdemux
parent919b4360140e0e4221628be3108323f001b57f5f (diff)
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
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/asf_mmst_streaming.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libmpdemux/asf_mmst_streaming.c b/libmpdemux/asf_mmst_streaming.c
index 28ce7ea7f4..dc0a94df91 100644
--- a/libmpdemux/asf_mmst_streaming.c
+++ b/libmpdemux/asf_mmst_streaming.c
@@ -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");
/*