Bug fix: Copies of overwriteable media onto sequential were mistaken in ROM drives
This commit is contained in:
parent
2774cbce07
commit
9a96d6a175
@ -275,6 +275,11 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
|||||||
struct burn_multi_caps *caps= NULL;
|
struct burn_multi_caps *caps= NULL;
|
||||||
struct isoburn_toc_entry *t;
|
struct isoburn_toc_entry *t;
|
||||||
char profile_name[80];
|
char profile_name[80];
|
||||||
|
struct isoburn_toc_disc *disc= NULL;
|
||||||
|
struct isoburn_toc_session **sessions;
|
||||||
|
struct isoburn_toc_track **tracks;
|
||||||
|
int num_sessions= 0, num_tracks= 0, track_count= 0, session_no= 0;
|
||||||
|
char msg[80];
|
||||||
|
|
||||||
profile_name[0]= 0;
|
profile_name[0]= 0;
|
||||||
ret= burn_disc_get_profile(d, &profile, profile_name);
|
ret= burn_disc_get_profile(d, &profile, profile_name);
|
||||||
@ -332,15 +337,38 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
|||||||
/* >>> recognize unsuitable media (but allow read-only media) */;
|
/* >>> recognize unsuitable media (but allow read-only media) */;
|
||||||
|
|
||||||
if(readonly) {
|
if(readonly) {
|
||||||
/* This might be overwriteable media in a -ROM drive */
|
/* This might be overwriteable media in a -ROM drive.
|
||||||
if((flag & 16)) {
|
Pitfall:
|
||||||
ret= 0;
|
Multi-session media which bear a xorriso image for overwriteables
|
||||||
|
in their first session would get a TOC of that first image rather
|
||||||
|
than of the media.
|
||||||
|
It is not possible to distinguish a BD-RE from a single session
|
||||||
|
BD-R with an image for overwriteables. But as soon as the media
|
||||||
|
bears 2 logical tracks it cannot be overwriteable.
|
||||||
|
So count the number of tracks first.
|
||||||
|
*/
|
||||||
|
disc= isoburn_toc_drive_get_disc(d);
|
||||||
|
if(disc != NULL) {
|
||||||
|
sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions);
|
||||||
|
for(session_no= 0; session_no < num_sessions; session_no++) {
|
||||||
|
tracks= isoburn_toc_session_get_tracks(sessions[session_no],
|
||||||
|
&num_tracks);
|
||||||
|
track_count+= num_tracks;
|
||||||
|
}
|
||||||
|
isoburn_toc_disc_free(disc);
|
||||||
|
}
|
||||||
|
|
||||||
|
sprintf(msg, "ROM media has libburn track count = %d", track_count);
|
||||||
|
isoburn_msgs_submit(*o, 0x00060000, msg, 0, "DEBUG", 0);
|
||||||
|
|
||||||
|
if((flag & 16) || track_count >= 2) {
|
||||||
|
ret= 0; /* toc emulation off, or not overwriteable */
|
||||||
} else {
|
} else {
|
||||||
ret= isoburn_emulate_toc(d, 1);
|
ret= isoburn_emulate_toc(d, 1);
|
||||||
if(ret<0)
|
if(ret<0)
|
||||||
goto ex;
|
goto ex;
|
||||||
}
|
}
|
||||||
if(ret==0 && profile !=0x08 && (flag&8)) {
|
if(ret == 0 && profile != 0x08 && (flag&8)) {
|
||||||
/* This might also be multi-session media which do not
|
/* This might also be multi-session media which do not
|
||||||
get shown with a decent TOC.
|
get shown with a decent TOC.
|
||||||
CD-R TOC (profile 0x08) can be trusted. Others not.
|
CD-R TOC (profile 0x08) can be trusted. Others not.
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2009.06.24.133521"
|
#define Xorriso_timestamP "2009.06.25.125048"
|
||||||
|
Loading…
Reference in New Issue
Block a user