[FFmpeg-cvslog] tcp: Check the listen call
Jordi Ortiz
git at videolan.org
Sun Jun 17 23:00:06 CEST 2012
ffmpeg | branch: master | Jordi Ortiz <nenjordi at gmail.com> | Sat Jun 16 12:29:53 2012 +0200| [a7cc78cb11dfdd356d83a2bdbb00eb92c1367379] | committer: Martin Storsjö
tcp: Check the listen call
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a7cc78cb11dfdd356d83a2bdbb00eb92c1367379
---
libavformat/tcp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index a6eeeb0..7e348f7 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();
More information about the ffmpeg-cvslog
mailing list