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 );
participants (1)
-
ulion