0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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.
This commit is contained in:
wm4 2016-03-29 11:43:16 +02:00
parent 57506b27ed
commit 8d69731871

View File

@ -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;