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>
if (!ret)
return AVERROR(ETIMEDOUT);
if (ret < 0)
- return AVERROR(errno);
+ return ff_neterrno();
return ret;
}
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;
}