On Sat, Jun 16, 2012 at 12:29 PM, Jordi Ortiz <nenjo...@gmail.com> wrote: > --- > 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; > + }
I think listen() should return -1 in case of failure... > fd1 = accept(fd, NULL, NULL); > if (fd1 < 0) { > ret = ff_neterrno(); > -- > 1.7.10 > > _______________________________________________ > libav-devel mailing list > libav-devel@libav.org > https://lists.libav.org/mailman/listinfo/libav-devel -- Best regards, Samuel Pitoiset. _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel