Kept DVD+RW from stopping BG formatting if it was not started at all
This commit is contained in:
parent
a5089dcd6e
commit
87576c3dfc
@ -1 +1 @@
|
||||
#define Cdrskin_timestamP "2007.01.16.151041"
|
||||
#define Cdrskin_timestamP "2007.01.18.211740"
|
||||
|
@ -255,6 +255,8 @@ void mmc_close(struct burn_drive *d, int session, int track)
|
||||
/* ts A61030 : shifted !!session rather than or-ing plain session */
|
||||
c.opcode[2] = ((!!session)<<1) | !!track;
|
||||
|
||||
fprintf(stderr, "LIBBURN_DEBUG: mmc_close %d\n", c.opcode[2]);
|
||||
|
||||
c.opcode[4] = track >> 8;
|
||||
c.opcode[5] = track & 0xFF;
|
||||
c.page = NULL;
|
||||
@ -1412,7 +1414,7 @@ selected_not_suitable:;
|
||||
if (d->format_descr_type == 2) /* formatted */
|
||||
return 1;
|
||||
if (d->format_descr_type == 3){/*intermediate*/
|
||||
d->dvd_minus_rw_incomplete = 1;
|
||||
d->needs_close_session = 1;
|
||||
return 1;
|
||||
}
|
||||
/* does trying make sense at all ? */
|
||||
@ -1510,7 +1512,7 @@ unsuitable_media:;
|
||||
}
|
||||
return 0;
|
||||
} else if ((!c.error) && (format_type == 0x13 || format_type == 0x15))
|
||||
d->dvd_minus_rw_incomplete = 1;
|
||||
d->needs_close_session = 1;
|
||||
if (return_immediately)
|
||||
return 1;
|
||||
usleep(1000000); /* there seems to be a little race condition */
|
||||
@ -1670,7 +1672,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->needs_close_session = 0;
|
||||
d->bg_format_status = -1;
|
||||
d->num_format_descr = 0;
|
||||
|
||||
|
@ -154,7 +154,7 @@ struct burn_drive
|
||||
|
||||
/* ts A70114 : wether a DVD-RW media holds an incomplete session
|
||||
(which could need closing after write) */
|
||||
int dvd_minus_rw_incomplete;
|
||||
int needs_close_session;
|
||||
|
||||
/* ts A61218 from 46h GET CONFIGURATION */
|
||||
int bg_format_status; /* 0=needs format start, 1=needs format restart*/
|
||||
|
@ -920,12 +920,14 @@ int burn_dvd_write_session(struct burn_write_opts *o,
|
||||
}
|
||||
if (d->current_profile == 0x1a) {
|
||||
/* DVD+RW */
|
||||
if (d->needs_close_session) {
|
||||
ret = burn_disc_close_session_dvd_plus_rw(o, s);
|
||||
if (ret <= 0)
|
||||
return 0;
|
||||
}
|
||||
} else if (d->current_profile == 0x13) {
|
||||
/* DVD-RW restricted overwrite */
|
||||
if (d->dvd_minus_rw_incomplete) {
|
||||
if (d->needs_close_session) {
|
||||
ret = burn_disc_close_session_dvd_minus_rw(o, s);
|
||||
if (ret <= 0)
|
||||
return 0;
|
||||
@ -953,6 +955,7 @@ int burn_disc_setup_dvd_plus_rw(struct burn_write_opts *o,
|
||||
if (ret <= 0)
|
||||
return 0;
|
||||
d->busy = BURN_DRIVE_WRITING;
|
||||
d->needs_close_session = 1;
|
||||
}
|
||||
d->nwa = 0;
|
||||
if (o->start_byte >= 0) {
|
||||
@ -1047,6 +1050,7 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
||||
struct burn_drive *d = o->drive;
|
||||
char msg[160];
|
||||
|
||||
d->needs_close_session = 0;
|
||||
for (sx = 0; sx < disc->sessions; sx++)
|
||||
for (tx = 0 ; tx < disc->session[sx]->tracks; tx++) {
|
||||
mode = disc->session[sx]->track[tx]->mode;
|
||||
|
Loading…
Reference in New Issue
Block a user