Bugfix with DVD+RW : progress indicators were initialized too late

This commit is contained in:
Thomas Schmitt 2006-12-24 18:22:27 +00:00
parent f12ef8b0e1
commit 34e2cf4c8c
2 changed files with 10 additions and 8 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.12.24.154455" #define Cdrskin_timestamP "2006.12.24.182307"

View File

@ -587,9 +587,6 @@ int burn_disc_init_track_status(struct burn_write_opts *o,
{ {
struct burn_drive *d = o->drive; struct burn_drive *d = o->drive;
/* ts A61102 */
d->busy = BURN_DRIVE_WRITING;
/* Update progress */ /* Update progress */
d->progress.start_sector = d->nwa; d->progress.start_sector = d->nwa;
d->progress.sectors = sectors; d->progress.sectors = sectors;
@ -599,6 +596,9 @@ int burn_disc_init_track_status(struct burn_write_opts *o,
by bonfire-app@wanadoo.fr in http://libburn.pykix.org/ticket/58 */ by bonfire-app@wanadoo.fr in http://libburn.pykix.org/ticket/58 */
d->progress.track = tnum; d->progress.track = tnum;
/* ts A61102 */
d->busy = BURN_DRIVE_WRITING;
return 1; return 1;
} }
@ -781,6 +781,8 @@ int burn_disc_init_write_status(struct burn_write_opts *o,
{ {
struct burn_drive *d = o->drive; struct burn_drive *d = o->drive;
d->cancel = 0;
/* init progress before showing the state */ /* init progress before showing the state */
d->progress.session = 0; d->progress.session = 0;
d->progress.sessions = disc->sessions; d->progress.sessions = disc->sessions;
@ -794,6 +796,7 @@ int burn_disc_init_write_status(struct burn_write_opts *o,
d->progress.start_sector = 0; d->progress.start_sector = 0;
d->progress.sectors = 0; d->progress.sectors = 0;
d->progress.sector = 0; d->progress.sector = 0;
d->progress.track = 0;
/* ts A61023 */ /* ts A61023 */
d->progress.buffer_capacity = 0; d->progress.buffer_capacity = 0;
@ -1008,7 +1011,6 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
} }
o->obs = 32*1024; /* buffer flush trigger for sector.c:get_sector() */ o->obs = 32*1024; /* buffer flush trigger for sector.c:get_sector() */
burn_disc_init_write_status(o, disc);
for (i = 0; i < disc->sessions; i++) { for (i = 0; i < disc->sessions; i++) {
/* update progress */ /* update progress */
d->progress.session = i; d->progress.session = i;
@ -1054,7 +1056,9 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
burn_message_clear_queue(); burn_message_clear_queue();
*/ */
d->cancel = 0; /* ts A61224 */
burn_disc_init_write_status(o, disc); /* must be done very early */
d->buffer = &buf; d->buffer = &buf;
memset(d->buffer, 0, sizeof(struct buffer)); memset(d->buffer, 0, sizeof(struct buffer));
d->rlba = -150; d->rlba = -150;
@ -1100,8 +1104,6 @@ return crap. so we send the command, then ignore the result.
msg,0,0); msg,0,0);
} }
burn_disc_init_write_status(o, disc);
for (i = 0; i < disc->sessions; i++) { for (i = 0; i < disc->sessions; i++) {
/* update progress */ /* update progress */
d->progress.session = i; d->progress.session = i;