summaryrefslogtreecommitdiff
path: root/libavformat/rtpproto.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2007-04-27 00:35:54 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2007-04-27 00:35:54 +0000
commit8da4034f529f3c5dcc3f95a7d81032cc9be543fb (patch)
treedc3e28a55483f023bb7c13d27630f58830a4af02 /libavformat/rtpproto.c
parent0bdacf29d40b11cfd5dd0d13577a4bdc90afdcea (diff)
use ff_neterrno() and FF_NETERROR() for networking error handling
Originally committed as revision 8845 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtpproto.c')
-rw-r--r--libavformat/rtpproto.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index 4d32e667da..369a8057d2 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -178,7 +178,8 @@ static int rtp_read(URLContext *h, uint8_t *buf, int size)
len = recvfrom (s->rtp_fd, buf, size, 0,
(struct sockaddr *)&from, &from_len);
if (len < 0) {
- if (errno == EAGAIN || errno == EINTR)
+ if (ff_neterrno() == FF_NETERROR(EAGAIN) ||
+ ff_neterrno() == FF_NETERROR(EINTR))
continue;
return AVERROR_IO;
}
@@ -201,7 +202,8 @@ static int rtp_read(URLContext *h, uint8_t *buf, int size)
len = recvfrom (s->rtcp_fd, buf, size, 0,
(struct sockaddr *)&from, &from_len);
if (len < 0) {
- if (errno == EAGAIN || errno == EINTR)
+ if (ff_neterrno() == FF_NETERROR(EAGAIN) ||
+ ff_neterrno() == FF_NETERROR(EINTR))
continue;
return AVERROR_IO;
}
@@ -213,7 +215,8 @@ static int rtp_read(URLContext *h, uint8_t *buf, int size)
len = recvfrom (s->rtp_fd, buf, size, 0,
(struct sockaddr *)&from, &from_len);
if (len < 0) {
- if (errno == EAGAIN || errno == EINTR)
+ if (ff_neterrno() == FF_NETERROR(EAGAIN) ||
+ ff_neterrno() == FF_NETERROR(EINTR))
continue;
return AVERROR_IO;
}