whisper : fix index overflow in token-level timestamp logic (#2505)
This commit is contained in:
parent
a5abfe6a90
commit
0fbaac9c89
@ -7019,7 +7019,7 @@ static void whisper_exp_compute_token_level_timestamps(
|
|||||||
k++;
|
k++;
|
||||||
}
|
}
|
||||||
tokens[j].t1 = sample_to_timestamp(k);
|
tokens[j].t1 = sample_to_timestamp(k);
|
||||||
if (j < ns - 1 && tokens[j].t1 > tokens[j + 1].t0) {
|
if (j < n - 1 && tokens[j].t1 > tokens[j + 1].t0) {
|
||||||
tokens[j].t1 = tokens[j + 1].t0;
|
tokens[j].t1 = tokens[j + 1].t0;
|
||||||
} else {
|
} else {
|
||||||
s1 = k;
|
s1 = k;
|
||||||
|
Loading…
Reference in New Issue
Block a user