Avoiding SYNCHRONIZE CACHE if DVD track preparation has failed

This commit is contained in:
Thomas Schmitt 2013-03-12 11:48:07 +00:00
parent fc754f0878
commit a51f39e0b9
2 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2013.03.05.185440"
#define Cdrskin_timestamP "2013.03.12.114739"

View File

@ -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;
}