Fixed image size aligment to 1 MB with follow-up sessions

This commit is contained in:
Thomas Schmitt 2008-10-24 13:02:07 +00:00
parent 6ee18d7f85
commit e76340d4f3
2 changed files with 10 additions and 6 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.10.22.201702"
#define Xorriso_timestamP "2008.10.24.130124"

View File

@ -787,7 +787,7 @@ int Xorriso_sanitize_image_size(struct XorrisO *xorriso,
struct burn_write_opts *burn_options, int flag)
{
int ret, img_sectors, num_sessions= 0, num_tracks= 0, padding= 0, profile;
int media_space;
int media_space, lba, nwa;
char profile_name[80];
struct burn_session **sessions;
struct burn_track **tracks;
@ -822,10 +822,14 @@ no_track:;
}
}
if(xorriso->alignment > 0) {
if(img_sectors > 0)
padding+= xorriso->alignment
- ((img_sectors + padding) % xorriso->alignment);
else if(padding < xorriso->alignment)
if(img_sectors > 0) {
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &lba, &nwa);
if(ret <= 0)
nwa= 0;
lba= (nwa + img_sectors + padding) % xorriso->alignment;
if(lba > 0)
padding+= xorriso->alignment - lba;
} else if(padding < xorriso->alignment)
padding= xorriso->alignment;
}
burn_track_define_data(tracks[0], 0, padding * 2048, 0, BURN_MODE1);