[Mplayer-cvslog] CVS: main/libmpdemux cdda.c,1.8,1.9
Alex Beregszaszi
alex at mplayerhq.hu
Sat Mar 22 22:15:13 CET 2003
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv19678
Modified Files:
cdda.c
Log Message:
fixed trivial seeking bugs, patch by Krister Lagerstrom <krister at kmlager.com>
Index: cdda.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/cdda.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- cdda.c 15 Jan 2003 17:50:21 -0000 1.8
+++ cdda.c 22 Mar 2003 21:14:51 -0000 1.9
@@ -182,8 +182,10 @@
s->pos = p->sector*CD_FRAMESIZE_RAW;
memcpy(s->buffer,buf,CD_FRAMESIZE_RAW);
- if(p->sector == p->end_sector)
+ if((p->sector < p->start_sector) || (p->sector >= p->end_sector)) {
s->eof = 1;
+ return 0;
+ }
for(i=0;i<p->cd->tracks;i++){
if(p->cd->disc_toc[i].dwStartSector==p->sector-1) {
@@ -206,6 +208,11 @@
int sec;
int current_track=0, seeked_track=0;
int i;
+
+ if(s->pos < 0) {
+ s->eof = 1;
+ return;
+ }
sec = s->pos/CD_FRAMESIZE_RAW;
//printf("pos: %d, sec: %d ## %d\n", (int)s->pos, (int)sec, CD_FRAMESIZE_RAW);
More information about the MPlayer-cvslog
mailing list