Bug fix: Since 1.0.6: Unreadable image produced by: xorrisofs ... >image.iso

This commit is contained in:
2011-07-07 11:44:45 +00:00
parent 53a2eb9c5b
commit 3f58069723
4 changed files with 14 additions and 5 deletions

View File

@@ -488,6 +488,8 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
ret= burn_disc_track_lba_nwa(d, NULL, 0, &lba, &nwa);
if(ret>0)
(*o)->nwa= nwa;
if((*o)->nwa < (*o)->zero_nwa)
(*o)->zero_nwa= 0;
#endif
}
@@ -675,7 +677,7 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast)
to zero size and change its state */
burn_disc_erase(drive, fast);
o->fabricated_disc_status= burn_disc_get_status(drive);
o->nwa= 0;
o->nwa= o->zero_nwa= 0;
goto ex;
}
if(o->emulation_mode > 0) { /* might be readonly with emulated sessions */
@@ -1006,6 +1008,8 @@ int isoburn_set_start_byte(struct isoburn *o, off_t value, int flag)
if(value % caps->start_alignment)
value+= caps->start_alignment - (value % caps->start_alignment);
o->nwa= value/2048;
if(o->nwa < o->zero_nwa)
o->zero_nwa= 0;
/* If suitable for media alignment, round up to Libisoburn_nwa_alignemenT */
if((o->nwa % Libisoburn_nwa_alignemenT) &&
((Libisoburn_nwa_alignemenT*2048) % caps->start_alignment)==0 )