[MPlayer-cvslog] CVS: main/libmpdemux cdda.c,1.16,1.17
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Sun Nov 6 15:17:53 CET 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv31416/libmpdemux
Modified Files:
cdda.c
Log Message:
fix cdda://n syntax: do not hang when n > nr_tracks and play only track n,
not all after (unfortunately, cdda://n- does not work, use e.g. cdda://n-99999).
Index: cdda.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/cdda.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- cdda.c 5 Nov 2005 11:40:06 -0000 1.16
+++ cdda.c 6 Nov 2005 14:17:51 -0000 1.17
@@ -97,6 +97,7 @@
cdda_priv* priv;
cd_info_t *cd_info,*cddb_info = NULL;
unsigned int audiolen=0;
+ int last_track;
int i;
char *xmcd_file = NULL;
@@ -185,14 +186,16 @@
if(p->speed)
cdda_speed_set(cdd,p->speed);
+ last_track = cdda_tracks(cdd);
+ if (p->span.start > last_track) p->span.start = last_track;
+ if (p->span.end < p->span.start) p->span.end = p->span.start;
+ if (p->span.end > last_track) p->span.end = last_track;
if(p->span.start)
priv->start_sector = cdda_track_firstsector(cdd,p->span.start);
else
priv->start_sector = cdda_disc_firstsector(cdd);
if(p->span.end) {
- int last = cdda_tracks(cdd);
- if(p->span.end > last) p->span.end = last;
priv->end_sector = cdda_track_lastsector(cdd,p->span.end);
} else
priv->end_sector = cdda_disc_lastsector(cdd);
More information about the MPlayer-cvslog
mailing list