changeset 34489:bdc9f135ac26

Fix seeking beyond EOF in stream_cdda to work with cache.
author reimar
date Sun, 15 Jan 2012 12:40:02 +0000
parents 01c19d9b1e83
children 18e2bab60851
files stream/stream_cdda.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_cdda.c	Sun Jan 15 12:38:38 2012 +0000
+++ b/stream/stream_cdda.c	Sun Jan 15 12:40:02 2012 +0000
@@ -267,7 +267,10 @@
       track += start_track;
       if (track > end_track) {
         seek(stream, (p->end_sector + 1) * CD_FRAMESIZE_RAW);
-        return STREAM_ERROR;
+        // seeking beyond EOF should not be an error,
+        // the cache cannot handle changing stream pos and
+        // returning error.
+        return STREAM_OK;
       }
       seek_sector = track <= 0 ? p->start_sector
                                : p->cd->disc_toc[track].dwStartSector;