From 3c69b684a876ef929d878c580c3e58bd233603f9 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 4 Oct 2009 15:11:35 +0000 Subject: [PATCH] Fixed CD TAO multi-track -dummy bug reported by Philippe Rouquier --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/libdax_msgs.h | 1 + libburn/write.c | 24 ++++++++++++++++++++---- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 54a2ae7..541c1ca 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.09.22.192802" +#define Cdrskin_timestamP "2009.10.04.151239" diff --git a/libburn/libdax_msgs.h b/libburn/libdax_msgs.h index 1caac4c..127628f 100644 --- a/libburn/libdax_msgs.h +++ b/libburn/libdax_msgs.h @@ -550,6 +550,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff 0x00020170 (NOTE,HIGH) = Closing open session before writing new one 0x00020171 (NOTE,HIGH) = Closing BD-R with accidently open session 0x00020172 (SORRY,HIGH) = Read start address larger than number of readable blocks + 0x00020173 (FAILURE,HIGH) = Drive tells NWA smaller than last written address libdax_audioxtr: diff --git a/libburn/write.c b/libburn/write.c index c8f52c2..cdd4ee6 100644 --- a/libburn/write.c +++ b/libburn/write.c @@ -769,8 +769,18 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s, libdax_msgs_submit(libdax_messenger, d->global_index, 0x000002, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO, msg, 0, 0); - if (nwa > d->nwa) - d->nwa = nwa; + + /* ts A91003 */ + if (nwa < d->nwa) { + libdax_msgs_submit(libdax_messenger, d->global_index, + 0x00020173, + LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH, + "Drive tells NWA smaller than last written address", + 0, 0); + d->sync_cache(d); + return 0; + } + d->nwa = nwa; } @@ -867,8 +877,14 @@ ex:; d->sync_cache(d); /* ts A61030 */ - if (burn_write_close_track(o, s, tnum) <= 0) - ret = 0; + /* ts A91003 : + At least in simulation mode this causes NWA=0 for the + next track. cdrecord does not use CLOSE TRACK at all but + ends the tracks by SYNCHRONIZE CACHE alone. + */ + if (!o->simulate) + if (burn_write_close_track(o, s, tnum) <= 0) + ret = 0; } return ret; }