aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/tcp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2009-07-15 05:52:49 +0000
committerDiego Biurrun <diego@biurrun.de>2009-07-15 05:52:49 +0000
commit73c1326809b3da1e701aad46a36943e2d65db52a (patch)
treec5b8cd93a86afab46e00d9da108e72ff30292dbf /libavformat/tcp.c
parentd6a1611cc259b94162904267e070a3d58aba7e7a (diff)
downloadffmpeg-73c1326809b3da1e701aad46a36943e2d65db52a.tar.gz
Use ff_neterrno instead of errno in tcp.c.
If ff_neterrno() is checked instead of errno, that's probably what should be used in the return value. As a sideeffect, this gives better compatibility with Windows (CE), where network errors aren't visible in errno.) patch by Martin Storsjö, martin martin st Originally committed as revision 19433 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/tcp.c')
-rw-r--r--libavformat/tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index b7983e7c98..05676eb83d 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -130,7 +130,7 @@ static int tcp_read(URLContext *h, uint8_t *buf, int size)
if (len < 0) {
if (ff_neterrno() != FF_NETERROR(EINTR) &&
ff_neterrno() != FF_NETERROR(EAGAIN))
- return AVERROR(errno);
+ return AVERROR(ff_neterrno());
} else return len;
} else if (ret < 0) {
return -1;
@@ -160,7 +160,7 @@ static int tcp_write(URLContext *h, uint8_t *buf, int size)
if (len < 0) {
if (ff_neterrno() != FF_NETERROR(EINTR) &&
ff_neterrno() != FF_NETERROR(EAGAIN))
- return AVERROR(errno);
+ return AVERROR(ff_neterrno());
continue;
}
size -= len;