Bug fix: Some drives return -150 as NWA of blank CD, rather than 0

This commit is contained in:
Thomas Schmitt 2011-07-31 08:31:11 +00:00
parent 55a6563e92
commit 44dea991a6
3 changed files with 8 additions and 3 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2011.07.31.080152"
#define Cdrskin_timestamP "2011.07.31.083046"

View File

@ -444,6 +444,11 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
*nwa = mmc_four_char_to_int(data + 12);
num = mmc_four_char_to_int(data + 16);
/* Pioneer BD-RW BDR-205 and LITE-ON LTR-48125S return -150 as *nwa
of blank media */
if (*nwa < *lba && d->status == BURN_DISC_BLANK)
*nwa = *lba;
#ifdef Libburn_pioneer_dvr_216d_load_mode5
/* >>> memorize track mode : data[6] & 0xf */;
#endif

View File

@ -634,7 +634,7 @@ void spc_sense_write_params(struct burn_drive *d)
{
struct buffer *buf = NULL;
struct scsi_mode_data *m;
int dummy, alloc_len = 10;
int dummy1, dummy2, alloc_len = 10;
unsigned char *page;
struct command *c = NULL;
@ -679,7 +679,7 @@ void spc_sense_write_params(struct burn_drive *d)
else if (d->status == BURN_DISC_BLANK ||
(d->current_is_cd_profile && d->status == BURN_DISC_APPENDABLE)) {
burn_drive_send_default_page_05(d, 0);
d->get_nwa(d, -1, &dummy, &dummy);
d->get_nwa(d, -1, &dummy1, &dummy2);
}
/* others are hopefully up to date from mmc_read_disc_info() */