Avoided closing of 0x13-DVD-RW sessions which are not intermediate

This commit is contained in:
Thomas Schmitt 2007-01-14 13:41:19 +00:00
parent f28ec96709
commit 9180a0036d
4 changed files with 18 additions and 8 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2007.01.14.115347"
#define Cdrskin_timestamP "2007.01.14.133951"

View File

@ -1409,10 +1409,12 @@ selected_not_suitable:;
if (d->best_format_size <= 0)
return 1;
} else {
/* formatted or intermediate state ? */
if (d->format_descr_type == 2 ||
d->format_descr_type == 3)
if (d->format_descr_type == 2) /* formatted */
return 1;
if (d->format_descr_type == 3){/*intermediate*/
d->dvd_minus_rw_incomplete = 1;
return 1;
}
/* does trying make sense at all ? */
tolerate_failure = 1;
}
@ -1507,7 +1509,8 @@ unsuitable_media:;
msg, 0, 0);
}
return 0;
}
} else if ((!c.error) && (format_type == 0x13 || format_type == 0x15))
d->dvd_minus_rw_incomplete = 1;
if (return_immediately)
return 1;
usleep(1000000); /* there seems to be a little race condition */
@ -1667,6 +1670,7 @@ int mmc_setup_drive(struct burn_drive *d)
d->current_profile_text[0] = 0;
d->current_is_cd_profile = 0;
d->current_is_supported_profile = 0;
d->dvd_minus_rw_incomplete = 0;
d->bg_format_status = -1;
d->num_format_descr = 0;

View File

@ -152,6 +152,10 @@ struct burn_drive
int current_is_cd_profile;
int current_is_supported_profile;
/* ts A70114 : wether a DVD-RW media holds an incomplete session
(which could need closing after write) */
int dvd_minus_rw_incomplete;
/* ts A61218 from 46h GET CONFIGURATION */
int bg_format_status; /* 0=needs format start, 1=needs format restart*/

View File

@ -925,9 +925,11 @@ int burn_dvd_write_session(struct burn_write_opts *o,
return 0;
} else if (d->current_profile == 0x13) {
/* DVD-RW restricted overwrite */
if (d->dvd_minus_rw_incomplete) {
ret = burn_disc_close_session_dvd_minus_rw(o, s);
if (ret <= 0)
return 0;
}
} else if (d->current_profile == 0x12) {
/* DVD-RAM */
/* ??? any finalization needed ? */;