Mercurial > mplayer.hg
diff stream/stream_cdda.c @ 34372:622b7e95695a
Fail if trying to seek beyond the last chapter, not just if it is beyond the end of the disc.
author | reimar |
---|---|
date | Fri, 23 Dec 2011 19:00:31 +0000 |
parents | a4dd7151526b |
children | 09f2662d11cb |
line wrap: on
line diff
--- a/stream/stream_cdda.c Fri Dec 23 16:44:23 2011 +0000 +++ b/stream/stream_cdda.c Fri Dec 23 19:00:31 2011 +0000 @@ -254,9 +254,10 @@ 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; }