diff options
Diffstat (limited to 'stream/stream.c')
-rw-r--r-- | stream/stream.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/stream.c b/stream/stream.c index b4e4bd9c70..6fc8e95b08 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -361,8 +361,10 @@ static int stream_read_unbuffered(stream_t *s, void *buf, int len) { int orig_len = len; s->buf_pos = s->buf_len = 0; - if (mp_cancel_test(s->cancel)) + if (mp_cancel_test(s->cancel)) { + s->eof = 1; return 0; + } // we will retry even if we already reached EOF previously. len = s->fill_buffer ? s->fill_buffer(s, buf, len) : -1; if (len < 0) |