diff --git a/cdrskin/cdrskin.c b/cdrskin/cdrskin.c index 33b80d9..8d2b68c 100644 --- a/cdrskin/cdrskin.c +++ b/cdrskin/cdrskin.c @@ -4803,6 +4803,7 @@ int Cdrskin_toc(struct CdrskiN *skin, int flag) { int num_sessions= 0,num_tracks= 0,lba= 0,track_count= 0,total_tracks= 0; int session_no, track_no, pmin, psec, pframe, ret, final_ret= 1; + int track_offset = 1; struct burn_drive *drive; struct burn_disc *disc= NULL; struct burn_session **sessions; @@ -4838,19 +4839,26 @@ int Cdrskin_toc(struct CdrskiN *skin, int flag) goto cannot_read; } sessions= burn_disc_get_sessions(disc,&num_sessions); + if(num_sessions > 0) + track_offset = burn_session_get_start_tno(sessions[0], 0); + if(track_offset <= 0) + track_offset= 1; if(flag&1) { for(session_no= 0; session_no>> From where does cdrecord take "mode" ? */ @@ -4947,7 +4955,7 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag) { int num_sessions= 0,num_tracks= 0,lba= 0,track_count= 0,total_tracks= 0; int session_no, track_no, pmin, psec, pframe, ret, size= 0, nwa= 0; - int last_leadout= 0, ovwrt_full= 0; + int last_leadout= 0, ovwrt_full= 0, track_offset= 1; struct burn_drive *drive; struct burn_disc *disc= NULL; struct burn_session **sessions= NULL; @@ -5017,8 +5025,12 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag) ftils= ltils= 1; } else { - first_track= 1; sessions= burn_disc_get_sessions(disc, &num_sessions); + if(num_sessions > 0) + track_offset= burn_session_get_start_tno(sessions[0], 0); + if(track_offset <= 0) + track_offset= 1; + first_track= track_offset; nominal_sessions= num_sessions; if(s == BURN_DISC_APPENDABLE) nominal_sessions++; @@ -5038,8 +5050,8 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag) } printf("first track: %d\n", first_track); printf("number of sessions: %d\n", nominal_sessions); - printf("first track in last sess: %d\n", ftils); - printf("last track in last sess: %d\n", ltils); + printf("first track in last sess: %d\n", ftils + track_offset - 1); + printf("last track in last sess: %d\n", ltils + track_offset - 1); burn_disc_get_cd_info(drive, disc_type, &disc_id, bar_code, &app_code, &cd_info_valid); @@ -5110,7 +5122,7 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag) #endif /* Cdrskin_with_last_recorded_addresS */ printf("%5d %5d %-6s %-10d %-10d %-10d\n", - track_count, session_no + 1, + track_count + track_offset - 1, session_no + 1, ((toc_entry.control&7)<4) ? "Audio" : "Data", lba, lra, size); last_leadout= lba + size; diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index c7d18ee..27ca08f 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2012.01.08.141104" +#define Cdrskin_timestamP "2012.01.08.154822"