Made clear that a drive needs an isoburn object for writing. Coverity CID 28758.
This commit is contained in:
parent
089ff7586c
commit
9efb046330
@ -920,40 +920,45 @@ void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
|
||||
ret= isoburn_find_emulator(&o, drive, 0);
|
||||
if(ret<0)
|
||||
goto ex;
|
||||
if(o!=NULL) {
|
||||
o->wrote_well= -1;
|
||||
if(o->emulation_mode!=0) {
|
||||
burn_write_opts_set_multi(opts, 0);
|
||||
if(o->emulation_mode>0 && o->nwa >= 0) {
|
||||
nwa= o->nwa;
|
||||
if(o == NULL) {
|
||||
sprintf(msg,
|
||||
"Program error: Cannot find isoburn object associated to the drive");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
burn_drive_cancel(drive);
|
||||
goto ex;
|
||||
}
|
||||
o->wrote_well= -1;
|
||||
if(o->emulation_mode!=0) {
|
||||
burn_write_opts_set_multi(opts, 0);
|
||||
if(o->emulation_mode>0 && o->nwa >= 0) {
|
||||
nwa= o->nwa;
|
||||
|
||||
/* This caters for unwritten formatted DVD-RW. They need to be written
|
||||
sequentially on the first use. Only written areas are random access.
|
||||
If the first session is not written to LBA 0, then re-opening of
|
||||
formatting and padding is needed.
|
||||
This can be done. But when the track gets closed after padding,
|
||||
this lasts a long time. There is a high risk that an app will not
|
||||
poll the message queue while waiting for isoburn_disc_write() to
|
||||
return. The pacifier loop usually happens only afterwards.
|
||||
So automatic formatting might cause a nervous clueless user.
|
||||
/* This caters for unwritten formatted DVD-RW. They need to be written
|
||||
sequentially on the first use. Only written areas are random access.
|
||||
If the first session is not written to LBA 0, then re-opening of
|
||||
formatting and padding is needed.
|
||||
This can be done. But when the track gets closed after padding,
|
||||
this lasts a long time. There is a high risk that an app will not
|
||||
poll the message queue while waiting for isoburn_disc_write() to
|
||||
return. The pacifier loop usually happens only afterwards.
|
||||
So automatic formatting might cause a nervous clueless user.
|
||||
*/
|
||||
ret= isoburn_is_intermediate_dvd_rw(drive, 0);
|
||||
if(ret>0 && nwa>0 && nwa <= o->zero_nwa) {
|
||||
/* actually this should not happen since such media get recognized
|
||||
by isoburn_welcome_media and o->zero_nwa gets set to 0
|
||||
*/
|
||||
ret= isoburn_is_intermediate_dvd_rw(drive, 0);
|
||||
if(ret>0 && nwa>0 && nwa <= o->zero_nwa) {
|
||||
/* actually this should not happen since such media get recognized
|
||||
by isoburn_welcome_media and o->zero_nwa gets set to 0
|
||||
*/
|
||||
sprintf(msg,
|
||||
"DVD-RW insufficiently formatted. (Intermediate State, size unknown)");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
sprintf(msg,
|
||||
"It might help to first deformat it and then format it again");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "HINT", 0);
|
||||
burn_drive_cancel(drive); /* mark run as failure */
|
||||
goto ex;
|
||||
}
|
||||
/* end of DVD-RW oriented check */
|
||||
burn_write_opts_set_start_byte(opts, nwa * (off_t) 2048);
|
||||
sprintf(msg,
|
||||
"DVD-RW insufficiently formatted. (Intermediate State, size unknown)");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
|
||||
sprintf(msg,
|
||||
"It might help to first deformat it and then format it again");
|
||||
isoburn_msgs_submit(o, 0x00060000, msg, 0, "HINT", 0);
|
||||
burn_drive_cancel(drive); /* mark run as failure */
|
||||
goto ex;
|
||||
}
|
||||
/* end of DVD-RW oriented check */
|
||||
burn_write_opts_set_start_byte(opts, nwa * (off_t) 2048);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2015.11.03.150839"
|
||||
#define Xorriso_timestamP "2015.11.03.154102"
|
||||
|
Loading…
Reference in New Issue
Block a user