summaryrefslogtreecommitdiff
path: root/libavformat/tcp.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2007-04-27 00:41:50 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2007-04-27 00:41:50 +0000
commitba472aaf010e69661866decbd3cfde177d8c0ee9 (patch)
treee5a955ea482a37f9c2651cd195f59072ca8291b3 /libavformat/tcp.c
parent8da4034f529f3c5dcc3f95a7d81032cc9be543fb (diff)
downloadffmpeg-ba472aaf010e69661866decbd3cfde177d8c0ee9.tar.gz
implement ff_socket_nonblock and use it in networking code
Originally committed as revision 8846 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r--libavformat/tcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index b2f6d37a76..36b67076af 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -22,7 +22,6 @@
#include <unistd.h>
#include "network.h"
#include <sys/time.h>
-#include <fcntl.h>
typedef struct TCPContext {
int fd;
@@ -62,7 +61,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
fd = socket(AF_INET, SOCK_STREAM, 0);
if (fd < 0)
goto fail;
- fcntl(fd, F_SETFL, O_NONBLOCK);
+ ff_socket_nonblock(fd, 1);
redo:
ret = connect(fd, (struct sockaddr *)&dest_addr,