Experiment for TOC on overwriteables: Keep a target_head copy of session #1

This commit is contained in:
2008-05-06 14:45:49 +00:00
parent f830c30196
commit 3eae8634cd
5 changed files with 204 additions and 23 deletions

View File

@ -26,7 +26,6 @@
#endif /* Xorriso_standalonE */
#include "isoburn.h"
#include "libisoburn.h"
@ -281,11 +280,13 @@ int isoburn_activate_session(struct burn_drive *drive)
if (o->emulation_mode != 1)
return 1; /* don't need to activate session */
if (o->fabricated_disc_status != BURN_DISC_APPENDABLE)
if (!(o->fabricated_disc_status == BURN_DISC_APPENDABLE ||
(o->fabricated_disc_status == BURN_DISC_BLANK &&
o->zero_nwa > 0)))
return 1;
ret = burn_random_access_write(drive, 0, (char*)o->target_iso_head,
32*2048, 1);
Libisoburn_target_head_sizE, 1);
return ret;
}
@ -356,7 +357,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
} else if (!strncmp((char*)pvm->std_identifier, "CDXX1", 5)) {
/* empty image */
isoburn_set_start_byte(o, (off_t) 0, 0);
isoburn_set_start_byte(o, o->zero_nwa * 2048, 0);
o->fabricated_disc_status= BURN_DISC_BLANK;
} else {
/* treat any disc in an unknown format as full */