Improved reported number of missing bytes in case of track source shortage

This commit is contained in:
Thomas Schmitt 2012-06-17 17:33:26 +00:00
parent 8ce54bcb28
commit 577d34e931
2 changed files with 9 additions and 4 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2012.05.30.202249"
#define Cdrskin_timestamP "2012.06.17.173420"

View File

@ -185,13 +185,18 @@ static void get_bytes(struct burn_track *track, int count, unsigned char *data)
if (track->end_on_premature_eoi && shortage >= count &&
!track->open_ended) {
char msg[80];
/* Memorize that premature end of input happened */
off_t missing, inp_block_size, track_blocks;
inp_block_size = burn_sector_length(track->mode);
track_blocks = burn_track_get_sectors_2(track, 1);
missing = track_blocks * inp_block_size - track->sourcecount;
sprintf(msg,
"Premature end of input encountered. Missing: %d bytes",
shortage);
"Premature end of input encountered. Missing: %.f bytes",
(double) missing);
libdax_msgs_submit(libdax_messenger, -1, 0x00020180,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
msg, 0,0);
/* Memorize that premature end of input happened */
track->end_on_premature_eoi = 2;
}
if (track->open_ended || track->end_on_premature_eoi)