summaryrefslogtreecommitdiffstats
path: root/stream/stream_cdda.c
diff options
context:
space:
mode:
authorulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-14 08:26:06 +0000
committerulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-14 08:26:06 +0000
commit00f27965e5645de963bb57fd84e2acffd3320544 (patch)
treed8bf541572b7614fb33c3dbf8a76a7d21aa6ceca /stream/stream_cdda.c
parentdf0f80508ece7dab3740840fc0eb0b4ecef3f77f (diff)
downloadmpv-00f27965e5645de963bb57fd84e2acffd3320544.tar.bz2
mpv-00f27965e5645de963bb57fd84e2acffd3320544.tar.xz
Fix stream cdda seeks to CD's end and hangs forever bug.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25390 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_cdda.c')
-rw-r--r--stream/stream_cdda.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index 41319c6c59..cf575d35a4 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -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 );