mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
Merge commit '22f98ac19cf29f22b3e1d10314df9503f06fe683'
* commit '22f98ac19cf29f22b3e1d10314df9503f06fe683': network: Check for EINTR in ff_poll_interrupt Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
03210fe138
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user