summaryrefslogtreecommitdiffstats
path: root/libmpdemux/network.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-08 01:13:22 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-08 01:13:22 +0000
commitbf1a641ef4c0caf3f183f38ea7f1c1a1282b1262 (patch)
tree846ce96106a2cf8275e115275ec883b5b501d545 /libmpdemux/network.c
parent7e8101eeede7a7f86aa5e0e4b61900aaf984f541 (diff)
downloadmpv-bf1a641ef4c0caf3f183f38ea7f1c1a1282b1262.tar.bz2
mpv-bf1a641ef4c0caf3f183f38ea7f1c1a1282b1262.tar.xz
various small streaming fixes by Alban Bedel <albeu@free.fr>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4042 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/network.c')
-rw-r--r--libmpdemux/network.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libmpdemux/network.c b/libmpdemux/network.c
index 63a726ea2c..17b42226be 100644
--- a/libmpdemux/network.c
+++ b/libmpdemux/network.c
@@ -147,7 +147,7 @@ connect2Server(char *host, int port) {
return -1;
}
}
- tv.tv_sec = 5; // 5 seconds timeout on connection
+ tv.tv_sec = 15; // 15 seconds timeout on connection
tv.tv_usec = 0;
FD_ZERO( &set );
FD_SET( socket_server_fd, &set );
@@ -569,12 +569,17 @@ streaming_start(stream_t *stream, URL_t *url, int demuxer_type) {
}
stream->streaming_ctrl->url = url_copy(url);
-// stream->streaming_ctrl->demuxer_type = demuxer_type;
- stream->fd = -1;
+// stream->streaming_ctrl->demuxer_type = demuxer_type;
// For RTP streams, we usually don't know the stream type until we open it.
if( !strcmp( url->protocol, "rtp"))
{
+ if(stream->fd >= 0)
+ {
+ if(close(stream->fd) < 0)
+ printf("streaming_start : Closing socket %d failed %s\n",stream->fd,strerror(errno));
+ }
+ stream->fd = -1;
stream->fd = rtp_streaming_start( stream );
}
// For connection-oriented streams, we can usually determine the streaming type.