From a51f39e0b90b4700dcf19a68ff49474c29fd44c9 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 12 Mar 2013 11:48:07 +0000 Subject: [PATCH] Avoiding SYNCHRONIZE CACHE if DVD track preparation has failed --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/write.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index e3c3722d..04b2d70d 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2013.03.05.185440" +#define Cdrskin_timestamP "2013.03.12.114739" diff --git a/libburn/trunk/libburn/write.c b/libburn/trunk/libburn/write.c index cb5bd3e5..d5661846 100644 --- a/libburn/trunk/libburn/write.c +++ b/libburn/trunk/libburn/write.c @@ -1861,7 +1861,7 @@ int burn_dvd_write_track(struct burn_write_opts *o, struct burn_drive *d = o->drive; struct buffer *out = d->buffer; int sectors; - int i, open_ended = 0, ret= 0, is_flushed = 0; + int i, open_ended = 0, ret= 0, is_flushed = 0, track_open = 0; int first_buf_cap = 0, further_cap = 0, buf_cap_step = 1024; /* ts A70213 : eventually expand size of track to max */ @@ -1889,6 +1889,7 @@ int burn_dvd_write_track(struct burn_write_opts *o, if (ret <= 0) goto ex; } + track_open = 1; sectors = burn_track_get_sectors_2(t, 1); open_ended = burn_track_is_open_ended(t); @@ -1971,7 +1972,7 @@ int burn_dvd_write_track(struct burn_write_opts *o, ex:; if (d->cancel) burn_source_cancel(t->source); - if (!is_flushed) + if (track_open && !is_flushed) d->sync_cache(d); /* burn_write_flush() was not called */ return ret; }