From a7610aa0c9dbd928074c533912f6dd6e015fdc5f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 24 Dec 2006 14:24:35 +0000 Subject: [PATCH] Made DVD 32k end padding controllable --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/options.c | 1 + libburn/options.h | 1 + libburn/write.c | 7 ++++--- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 3e75838..22c1dda 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.12.24.140904" +#define Cdrskin_timestamP "2006.12.24.142512" diff --git a/libburn/options.c b/libburn/options.c index dc1e0b8..ef672b1 100644 --- a/libburn/options.c +++ b/libburn/options.c @@ -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; diff --git a/libburn/options.h b/libburn/options.h index 772b839..2a0d1a3 100644 --- a/libburn/options.h +++ b/libburn/options.h @@ -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; diff --git a/libburn/write.c b/libburn/write.c index 5e3df32..a616b4e 100644 --- a/libburn/write.c +++ b/libburn/write.c @@ -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",