mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
stream: don't set EOF flag in stream implementations
EOF should be set when reading more data fails. The stream implementations have nothing to say here and should behave correctly when trying to read when EOF was actually read. Even when seeking, a correct EOF flag should be guaranteed. stream_seek() (or actually stream_seek_long()) calls stream_fill_buffer() at least once, which also updates the EOF flag.
This commit is contained in:
@@ -200,7 +200,6 @@ static int fill_buffer(stream_t *s, char *buffer, int max_len)
|
||||
return -1;
|
||||
|
||||
if ((p->sector < p->start_sector) || (p->sector > p->end_sector)) {
|
||||
s->eof = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -237,7 +236,6 @@ static int seek(stream_t *s, int64_t newpos)
|
||||
s->pos = newpos;
|
||||
sec = s->pos / CDIO_CD_FRAMESIZE_RAW;
|
||||
if (s->pos < 0 || sec > p->end_sector) {
|
||||
s->eof = 1;
|
||||
p->sector = p->end_sector + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user