diff options
author | wm4 <wm4@nowhere> | 2016-03-29 11:43:16 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-29 11:43:16 +0200 |
commit | 8d6973187126d0ba6c9344c3db01144d0c3fac1e (patch) | |
tree | f71e8c325f121dbed1dda545ee4b4cd799f9801c | |
parent | 57506b27ed0d567c11bd932cf758318fb3b2079c (diff) | |
download | mpv-8d6973187126d0ba6c9344c3db01144d0c3fac1e.tar.bz2 mpv-8d6973187126d0ba6c9344c3db01144d0c3fac1e.tar.xz |
cache: fix incorrect EOF condition
Don't assume EOF if we didn't try to read anything in the first place.
Fixes regressions in particular with low cache sizes, which triggered
the other code paths more often.
-rw-r--r-- | stream/cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/cache.c b/stream/cache.c index 0ed371806d..874cdf4a8c 100644 --- a/stream/cache.c +++ b/stream/cache.c @@ -296,7 +296,8 @@ static void cache_fill(struct priv *s) done: ; bool prev_eof = s->eof; - s->eof = len <= 0; + if (read_attempted) + s->eof = len <= 0; if (!prev_eof && s->eof) { s->eof_pos = stream_tell(s->stream); s->speed_start = 0; |