aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-03-26 16:04:38 +0000
committerMartin Storsjö <martin@martin.st>2010-03-26 16:04:38 +0000
commitcae9a15c98eb9b1ba431d2d55a39171783407bc0 (patch)
tree01192de415e1cd1779690c5d7f7544e0347ead22 /libavformat/udp.c
parent3fd427cd194ca9bd486fb222277b03ee90a64384 (diff)
downloadffmpeg-cae9a15c98eb9b1ba431d2d55a39171783407bc0.tar.gz
Don't report EINTR from select as an error, retry select instead
Originally committed as revision 22694 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index dc896a43f1..84bca7b0d3 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -437,8 +437,11 @@ static int udp_read(URLContext *h, uint8_t *buf, int size)
tv.tv_sec = 0;
tv.tv_usec = 100 * 1000;
ret = select(s->udp_fd + 1, &rfds, NULL, NULL, &tv);
- if (ret < 0)
+ if (ret < 0) {
+ if (ff_neterrno() == FF_NETERROR(EINTR))
+ continue;
return AVERROR(EIO);
+ }
if (!(ret > 0 && FD_ISSET(s->udp_fd, &rfds)))
continue;
len = recv(s->udp_fd, buf, size, 0);