Avoiding repeated PVD read attempts if first reading of PVD yielded error

This commit is contained in:
2011-04-22 08:18:41 +00:00
parent be08aa8b5c
commit f860e24e58
5 changed files with 16 additions and 2 deletions

View File

@ -482,10 +482,14 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
memset(o->target_iso_head, 0, to_read);
if(capacity > 0 && (off_t) capacity * (off_t) 2048 < to_read)
to_read = (off_t) capacity * (off_t) 2048;
ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head,
to_read, &data_count, 2 | 8);
to_read, &data_count, 4 | 8);
/* <<< was 2 | 8); */
if (ret <= 0) {
/* an error means a disc with no ISO image */
o->media_read_error= 1;
if (ret == -2) {
path[0]= 0;
burn_drive_d_get_adr(drive, path);