Made DVD 32k end padding controllable

This commit is contained in:
Thomas Schmitt 2006-12-24 14:24:35 +00:00
parent d7caf0ca23
commit ff3b1102cb
4 changed files with 7 additions and 4 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.12.24.140904"
#define Cdrskin_timestamP "2006.12.24.142512"

View File

@ -33,6 +33,7 @@ struct burn_write_opts *burn_write_opts_new(struct burn_drive *drive)
opts->underrun_proof = drive->mdata->underrun_proof;
opts->perform_opc = 1;
opts->obs = -1;
opts->obs_pad = 0;
opts->start_byte = 0;
opts->has_mediacatalog = 0;
opts->format = BURN_CDROM;

View File

@ -36,6 +36,7 @@ struct burn_write_opts
/* ts A61219 : Output block size to trigger buffer flush if hit.
-1 with CD, 32 kB with DVD */
int obs;
int obs_pad; /* 1=pad up last block to obs */
/* ts A61222 : Start address for media which allow a choice */
off_t start_byte;

View File

@ -844,7 +844,7 @@ int burn_dvd_write_track(struct burn_write_opts *o,
}
/* Pad up buffer to next full 32 kB */
if (out->bytes > 0 && out->bytes < o->obs) {
if (o->obs_pad && out->bytes > 0 && out->bytes < o->obs) {
memset(out->data + out->bytes, 0, o->obs - out->bytes);
out->sectors += (o->obs - out->bytes) / 2048;
out->bytes = o->obs;
@ -853,7 +853,7 @@ int burn_dvd_write_track(struct burn_write_opts *o,
if (ret <= 0)
goto ex;
/* >>> any normal track finalizing */;
/* >>> any other normal track finalizing */;
ret = 1;
ex:;
@ -873,7 +873,7 @@ int burn_disc_close_session_dvd_plus_rw(struct burn_write_opts *o,
d->busy = BURN_DRIVE_CLOSING_SESSION;
/* This seems to be a quick end : "if (!dvd_compat)" */
/* >>> Stop de-icing (ongoing background format) quickly
by mmc_close() i(but with opcode[2]=0).
by mmc_close() (but with opcode[2]=0).
Wait for unit to get ready.
return 1;
*/
@ -995,6 +995,7 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
msg, 0,0);
goto early_failure;
}
o->obs_pad = 0; /* no filling-up of track's last 32k buffer */
} else {
sprintf(msg, "Unsuitable media detected. Profile %4.4Xh %s",