aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-05-24 15:19:19 +0200
committerMax Kellermann <max@duempel.org>2014-05-24 15:19:22 +0200
commitfb52a24da365e3f3eead726e4784186d6440c481 (patch)
tree215d06db12e32ae1334b61c8fe4d06e5f54f95e1 /src/input
parentfbafb19657f3337a4d0d5e4783cd91ad0c2963aa (diff)
downloadmpd-fb52a24da365e3f3eead726e4784186d6440c481.tar.gz
mpd-fb52a24da365e3f3eead726e4784186d6440c481.tar.xz
mpd-fb52a24da365e3f3eead726e4784186d6440c481.zip
input/async: add offset/size comparison to IsEOF()
Diffstat (limited to 'src/input')
-rw-r--r--src/input/AsyncInputStream.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx
index 3f2d3b90f..169a9e8e4 100644
--- a/src/input/AsyncInputStream.cxx
+++ b/src/input/AsyncInputStream.cxx
@@ -89,7 +89,8 @@ AsyncInputStream::Check(Error &error)
bool
AsyncInputStream::IsEOF()
{
- return !open && buffer.IsEmpty();
+ return (KnownSize() && offset >= size) ||
+ (!open && buffer.IsEmpty());
}
bool