Commit 03210fe1 authored by James Almer's avatar James Almer

Merge commit '22f98ac1'

* commit '22f98ac1':
  network: Check for EINTR in ff_poll_interrupt
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 5c1aafff 22f98ac1
......@@ -165,14 +165,17 @@ static int ff_poll_interrupt(struct pollfd *p, nfds_t nfds, int timeout,
if (ff_check_interrupt(cb))
return AVERROR_EXIT;
ret = poll(p, nfds, POLLING_TIME);
if (ret != 0)
if (ret != 0) {
if (ret < 0)
ret = ff_neterrno();
if (ret == AVERROR(EINTR))
continue;
break;
}
} while (timeout <= 0 || runs-- > 0);
if (!ret)
return AVERROR(ETIMEDOUT);
if (ret < 0)
return ff_neterrno();
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment