[MPlayer-cvslog] r34462 - trunk/stream/stream_cdda.c

reimar subversion at mplayerhq.hu
Fri Dec 23 22:52:04 CET 2011


Author: reimar
Date: Fri Dec 23 22:52:04 2011
New Revision: 34462

Log:
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.

Modified:
   trunk/stream/stream_cdda.c

Modified: trunk/stream/stream_cdda.c
==============================================================================
--- trunk/stream/stream_cdda.c	Fri Dec 23 22:50:32 2011	(r34461)
+++ trunk/stream/stream_cdda.c	Fri Dec 23 22:52:04 2011	(r34462)
@@ -182,6 +182,7 @@ static int seek(stream_t* s,off_t newpos
   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 @@ static int control(stream_t *stream, int
       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


More information about the MPlayer-cvslog mailing list