Mercurial > mplayer.hg
diff libmpdemux/network.c @ 4041:879a668ee540
various small streaming fixes by Alban Bedel <albeu@free.fr>
author | arpi |
---|---|
date | Tue, 08 Jan 2002 01:13:22 +0000 |
parents | 837ed2f1ed5e |
children | f732854e3d16 |
line wrap: on
line diff
--- a/libmpdemux/network.c Mon Jan 07 20:14:27 2002 +0000 +++ b/libmpdemux/network.c Tue Jan 08 01:13:22 2002 +0000 @@ -147,7 +147,7 @@ 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 @@ } 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.