1 --- discid.c.orig 2001-12-27 19:48:57.000000000 +0100
2 +++ discid.c 2004-02-23 20:18:45.000000000 +0100
6 unsigned long discid(cd * this_cd) {
7 - unsigned int i=0, t, n = 0;
8 + unsigned int i=0, t, n = 0, trks=0, l=0;
10 for (i=0; i< this_cd->tracks; i++)
11 - n += cddb_sum((this_cd->track[T2I(i)].start_lba+CD_MSF_OFFSET)/CD_FRAMES);
12 + if(this_cd->track[T2I(i)].type==AUDIO) {
13 + n += cddb_sum((this_cd->track[T2I(i)].start_lba+CD_MSF_OFFSET)/CD_FRAMES);
17 - t = this_cd->track[T2I(this_cd->tracks-1)].stop_lba/CD_FRAMES;
18 + t = (this_cd->track[T2I(l+1)].start_lba-
19 + this_cd->track[T2I(0)].start_lba)/CD_FRAMES;
21 - return (((n % 0xFF) << 24) | (t << 8) | this_cd->tracks);
22 + return (((n % 0xFF) << 24) | (t << 8) | trks);
26 --- root.c.orig 2002-04-07 18:31:39.000000000 +0200
27 +++ root.c 2005-02-05 17:27:48.000000000 +0100
29 this_cd->track[i].type = AUDIO;
30 this_cd->track[i].time = CURRENT_TIME;
31 this_cd->track[i].iso_size = 0;
32 + if ((t!=(this_cd->tracks - 1)) && t > 0 && (this_cd->track[i + 1].type!=AUDIO)) {
33 + this_cd->track[i].track_size = this_cd->track[i].track_size - 11400;
34 + this_cd->track[i].stop_lba = this_cd->track[i].stop_lba -11400;
36 this_cd->track[i].track_size = this_cd->track[i].track_size * CD_FRAMESIZE_RAW + ((this_cd->raw_audio==0)?WAV_HEADER_SIZE:0);
37 this_cd->track[i].size = this_cd->track[i].track_size;
38 this_cd->track[i].avi = 0;