From 6f2b20c57c0412ec26565fcc4c2ac06b15ca811b Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 4 Sep 2013 11:00:30 +0000 Subject: [PATCH] Catching and defaulting mad responses to READ BUFFER CAPACITY --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/mmc.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index 1593b652..4ad9e539 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2013.08.07.134744" +#define Cdrskin_timestamP "2013.09.04.105934" diff --git a/libburn/trunk/libburn/mmc.c b/libburn/trunk/libburn/mmc.c index e002c8c1..90acea08 100644 --- a/libburn/trunk/libburn/mmc.c +++ b/libburn/trunk/libburn/mmc.c @@ -3422,6 +3422,10 @@ int mmc_read_buffer_capacity(struct burn_drive *d) (data[4]<<24)|(data[5]<<16)|(data[6]<<8)|data[7]; d->progress.buffer_available = (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->pbf_altered = 0; if (d->progress.buffered_bytes >= d->progress.buffer_capacity){