summaryrefslogtreecommitdiff
path: root/libavformat/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/unix.c')
-rw-r--r--libavformat/unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/unix.c b/libavformat/unix.c
index 4f01d14a93..38016dbafe 100644
--- a/libavformat/unix.c
+++ b/libavformat/unix.c
@@ -111,6 +111,8 @@ static int unix_read(URLContext *h, uint8_t *buf, int size)
return ret;
}
ret = recv(s->fd, buf, size, 0);
+ if (!ret && s->type == SOCK_STREAM)
+ return AVERROR_EOF;
return ret < 0 ? ff_neterrno() : ret;
}