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

ulion subversion at mplayerhq.hu
Fri Dec 14 09:26:06 CET 2007


Author: ulion
Date: Fri Dec 14 09:26:06 2007
New Revision: 25390

Log:
Fix stream cdda seeks to CD's end and hangs forever bug.


Modified:
   trunk/stream/stream_cdda.c

Modified: trunk/stream/stream_cdda.c
==============================================================================
--- trunk/stream/stream_cdda.c	(original)
+++ trunk/stream/stream_cdda.c	Fri Dec 14 09:26:06 2007
@@ -331,12 +331,12 @@ static int seek(stream_t* s,off_t newpos
   int i;
   
   s->pos = newpos;
-  if(s->pos < 0) {
+  sec = s->pos/CD_FRAMESIZE_RAW;
+  if (s->pos < 0 || sec >= p->end_sector) {
     s->eof = 1;
     return 0;
   }
 
-  sec = s->pos/CD_FRAMESIZE_RAW;
 //printf("pos: %d, sec: %d ## %d\n", (int)s->pos, (int)sec, CD_FRAMESIZE_RAW);
 //printf("sector: %d  new: %d\n", p->sector, sec );
  



More information about the MPlayer-cvslog mailing list