# HG changeset patch # User reimar # Date 1324677124 0 # Node ID 09f2662d11cbe7ce89c0aa72bdb74cc9314ec8ec # Parent 7a4dbec9415bf93d62f0678a8e53e6a328cc60ab cdda: set position to an actual EOF position when we set EOF. This avoids some inconsistency like the stream indicating EOF but a read still returning more data. diff -r 7a4dbec9415b -r 09f2662d11cb stream/stream_cdda.c --- a/stream/stream_cdda.c Fri Dec 23 21:50:32 2011 +0000 +++ b/stream/stream_cdda.c Fri Dec 23 21:52:04 2011 +0000 @@ -182,6 +182,7 @@ sec = s->pos/CD_FRAMESIZE_RAW; if (s->pos < 0 || sec > p->end_sector) { s->eof = 1; + p->sector = p->end_sector + 1; return 0; } @@ -258,7 +259,7 @@ int seek_sector; track += start_track; if (track > end_track) { - stream->eof = 1; + seek(stream, (p->end_sector + 1) * CD_FRAMESIZE_RAW); return STREAM_ERROR; } seek_sector = track <= 0 ? p->start_sector