Mercurial > mplayer.hg
changeset 25362:74fbb5173956
Fix stream cdda seeks to CD's end and hangs forever bug.
author | ulion |
---|---|
date | Fri, 14 Dec 2007 08:26:06 +0000 |
parents | f95cd1391ea0 |
children | fa776bd7ebc4 |
files | stream/stream_cdda.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_cdda.c Fri Dec 14 08:16:39 2007 +0000 +++ b/stream/stream_cdda.c Fri Dec 14 08:26:06 2007 +0000 @@ -331,12 +331,12 @@ 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 );