diff options
author | Simon Thelen <ffmpeg-dev@c-14.de> | 2017-04-08 14:21:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-10 14:00:20 +0200 |
commit | 54b6bef6e13adf377c78c28ede22a4322ab28865 (patch) | |
tree | 67dbba31930d3f7dfa0d1cfe280871b8ba7e196a /libavformat/tcp.c | |
parent | 014d47ed74c43918430282d7cb2bf45dab3e14b7 (diff) |
libavformat/tcp: fix return code for tcp_accept
ff_accept can return AVERROR(ETIMEDOUT) and errno will be 0 (or
undefined), return ret instead and return ff_neterror() in
ff_poll_interrupt instead of AVERROR(errno) to parse WSAGetLastError on
Windows.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r-- | libavformat/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index 3055e48015..07b4ed9fa3 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -204,7 +204,7 @@ static int tcp_accept(URLContext *s, URLContext **c) cc = (*c)->priv_data; ret = ff_accept(sc->fd, sc->listen_timeout, s); if (ret < 0) - return ff_neterrno(); + return ret; cc->fd = ret; return 0; } |