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

reimar subversion at mplayerhq.hu
Fri Dec 23 20:00:31 CET 2011


Author: reimar
Date: Fri Dec 23 20:00:31 2011
New Revision: 34460

Log:
Fail if trying to seek beyond the last chapter, not just if it is beyond the end of the disc.

Modified:
   trunk/stream/stream_cdda.c

Modified: trunk/stream/stream_cdda.c
==============================================================================
--- trunk/stream/stream_cdda.c	Fri Dec 23 17:44:23 2011	(r34459)
+++ trunk/stream/stream_cdda.c	Fri Dec 23 20:00:31 2011	(r34460)
@@ -254,9 +254,10 @@ static int control(stream_t *stream, int
       int r;
       unsigned int track = *(unsigned int *)arg;
       int start_track = get_track_by_sector(p, p->start_sector);
+      int end_track = get_track_by_sector(p, p->end_sector);
       int seek_sector;
       track += start_track;
-      if (track >= p->cd->tracks) {
+      if (track > end_track) {
         stream->eof = 1;
         return STREAM_ERROR;
       }


More information about the MPlayer-cvslog mailing list