Catching and defaulting mad responses to READ BUFFER CAPACITY

This commit is contained in:
Thomas Schmitt 2013-09-04 11:00:30 +00:00
parent dc3449d613
commit 6f2b20c57c
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2013.08.07.134744" #define Cdrskin_timestamP "2013.09.04.105934"

View File

@ -3422,6 +3422,10 @@ int mmc_read_buffer_capacity(struct burn_drive *d)
(data[4]<<24)|(data[5]<<16)|(data[6]<<8)|data[7]; (data[4]<<24)|(data[5]<<16)|(data[6]<<8)|data[7];
d->progress.buffer_available = d->progress.buffer_available =
(data[8]<<24)|(data[9]<<16)|(data[10]<<8)|data[11]; (data[8]<<24)|(data[9]<<16)|(data[10]<<8)|data[11];
if (d->progress.buffer_capacity < d->progress.buffer_available) {
/* Default mad buffer usage to 50 percent */
d->progress.buffer_available = d->progress.buffer_capacity / 2;
}
d->pessimistic_buffer_free = d->progress.buffer_available; d->pessimistic_buffer_free = d->progress.buffer_available;
d->pbf_altered = 0; d->pbf_altered = 0;
if (d->progress.buffered_bytes >= d->progress.buffer_capacity){ if (d->progress.buffered_bytes >= d->progress.buffer_capacity){