diff options
author | Jordi Ortiz <nenjordi@gmail.com> | 2012-06-16 12:29:53 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-06-17 13:22:36 +0300 |
commit | a7cc78cb11dfdd356d83a2bdbb00eb92c1367379 (patch) | |
tree | b770d7232270ad523dd27f1d05aa9d7f71989a9c | |
parent | ae702edf438c67ea5ad257a6779f68900edd88c9 (diff) | |
download | ffmpeg-a7cc78cb11dfdd356d83a2bdbb00eb92c1367379.tar.gz |
tcp: Check the listen call
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavformat/tcp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index a6eeeb0d0f..7e348f7729 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -90,7 +90,11 @@ static int tcp_open(URLContext *h, const char *uri, int flags) ret = ff_neterrno(); goto fail1; } - listen(fd, 1); + ret = listen(fd, 1); + if (ret) { + ret = ff_neterrno(); + goto fail1; + } fd1 = accept(fd, NULL, NULL); if (fd1 < 0) { ret = ff_neterrno(); |