Improved -check_media handling of last two blocks in initial CD TAO session
This commit is contained in:
parent
cbe14a003a
commit
350f535197
@ -2465,7 +2465,7 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist,
|
|||||||
{
|
{
|
||||||
int i, j, ret, total_count= 0, sectors= -1, sector_size= -1, skip_reading;
|
int i, j, ret, total_count= 0, sectors= -1, sector_size= -1, skip_reading;
|
||||||
int prev_quality= -1, quality= -1, retry= 0, profile_no, is_cd= 0;
|
int prev_quality= -1, quality= -1, retry= 0, profile_no, is_cd= 0;
|
||||||
int start_sec, end_sec, first_value, fret;
|
int start_sec, end_sec, first_value, fret, suspect_tao_end= 0;
|
||||||
char profile_name[80];
|
char profile_name[80];
|
||||||
int start_lba= 0;
|
int start_lba= 0;
|
||||||
struct burn_drive *drive;
|
struct burn_drive *drive;
|
||||||
@ -2616,6 +2616,7 @@ abort_check:;
|
|||||||
}
|
}
|
||||||
|
|
||||||
to_read= read_chunk;
|
to_read= read_chunk;
|
||||||
|
suspect_tao_end= 0;
|
||||||
if(i + to_read > block_count)
|
if(i + to_read > block_count)
|
||||||
to_read= block_count - i;
|
to_read= block_count - i;
|
||||||
if(is_cd && i + to_read + 2 >= block_count) {
|
if(is_cd && i + to_read + 2 >= block_count) {
|
||||||
@ -2624,12 +2625,14 @@ abort_check:;
|
|||||||
*/
|
*/
|
||||||
if(to_read > 2)
|
if(to_read > 2)
|
||||||
to_read-= 2;
|
to_read-= 2;
|
||||||
else if(to_read > 1) {
|
else {
|
||||||
if(flag & 1) {
|
if(flag & 1) {
|
||||||
quality= Xorriso_read_quality_tao_enD;
|
quality= Xorriso_read_quality_tao_enD;
|
||||||
skip_reading= 1;
|
skip_reading= 1;
|
||||||
} else
|
} else if(to_read > 1) {
|
||||||
to_read--;
|
to_read--;
|
||||||
|
}
|
||||||
|
suspect_tao_end= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2666,7 +2669,8 @@ abort_check:;
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret= burn_read_data(drive, ((off_t) (i + from_lba)) * (off_t) 2048,
|
ret= burn_read_data(drive, ((off_t) (i + from_lba)) * (off_t) 2048,
|
||||||
data_pt, to_read * (off_t) 2048, &data_count, 4 * !retry);
|
data_pt, to_read * (off_t) 2048, &data_count,
|
||||||
|
(4 * !retry) | (16 * !!suspect_tao_end));
|
||||||
post_read_time= Sfile_microtime(0);
|
post_read_time= Sfile_microtime(0);
|
||||||
time_diff= post_read_time - pre_read_time;
|
time_diff= post_read_time - pre_read_time;
|
||||||
total_time_diff+= time_diff;
|
total_time_diff+= time_diff;
|
||||||
@ -2686,9 +2690,15 @@ abort_check:;
|
|||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
goto ex;
|
goto ex;
|
||||||
start_lba= i + from_lba + data_count / 2048;
|
start_lba= i + from_lba + data_count / 2048;
|
||||||
prev_quality= Xorriso_read_quality_unreadablE;
|
if(suspect_tao_end && ret == -3)
|
||||||
|
prev_quality= Xorriso_read_quality_tao_enD;
|
||||||
|
else
|
||||||
|
prev_quality= Xorriso_read_quality_unreadablE;
|
||||||
}
|
}
|
||||||
quality= Xorriso_read_quality_unreadablE;
|
if(suspect_tao_end && ret == -3)
|
||||||
|
quality= Xorriso_read_quality_tao_enD;
|
||||||
|
else
|
||||||
|
quality= Xorriso_read_quality_unreadablE;
|
||||||
if(retry)
|
if(retry)
|
||||||
to_read= data_count / 2048 + 1;
|
to_read= data_count / 2048 + 1;
|
||||||
} else
|
} else
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2012.10.24.095235"
|
#define Xorriso_timestamP "2012.10.25.125559"
|
||||||
|
Loading…
Reference in New Issue
Block a user