MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_poll_interrupt

Function ff_poll_interrupt

libavformat/network.c:156–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156static int ff_poll_interrupt(struct pollfd *p, nfds_t nfds, int timeout,
157 AVIOInterruptCB *cb)
158{
159 int runs = timeout / POLLING_TIME;
160 int ret = 0;
161
162 do {
163 if (ff_check_interrupt(cb))
164 return AVERROR_EXIT;
165 ret = poll(p, nfds, POLLING_TIME);
166 if (ret != 0) {
167 if (ret < 0)
168 ret = ff_neterrno();
169 if (ret == AVERROR(EINTR))
170 continue;
171 break;
172 }
173 } while (timeout <= 0 || runs-- > 0);
174
175 if (!ret)
176 return AVERROR(ETIMEDOUT);
177 return ret;
178}
179
180int ff_socket(int af, int type, int proto, void *logctx)
181{

Callers 3

ff_acceptFunction · 0.85
ff_listen_connectFunction · 0.85
ff_connect_parallelFunction · 0.85

Calls 2

ff_check_interruptFunction · 0.85
ff_neterrnoFunction · 0.85

Tested by

no test coverage detected