From cae9a15c98eb9b1ba431d2d55a39171783407bc0 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Fri, 26 Mar 2010 16:04:38 +0000 Subject: Don't report EINTR from select as an error, retry select instead Originally committed as revision 22694 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/tcp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavformat/tcp.c') diff --git a/libavformat/tcp.c b/libavformat/tcp.c index ae846a4c37..79cabdfe90 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -147,6 +147,8 @@ static int tcp_read(URLContext *h, uint8_t *buf, int size) return AVERROR(ff_neterrno()); } else return len; } else if (ret < 0) { + if (ff_neterrno() == FF_NETERROR(EINTR)) + continue; return -1; } } @@ -180,6 +182,8 @@ static int tcp_write(URLContext *h, uint8_t *buf, int size) size -= len; buf += len; } else if (ret < 0) { + if (ff_neterrno() == FF_NETERROR(EINTR)) + continue; return -1; } } -- cgit v1.2.3