mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
evrcdec: fix sign error
The specification wants round(abs(x))) * sign(x) which is equivakent to round(x) Fixes out of array access Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
64819bfc7a
commit
f18d2dff11
@ -374,7 +374,7 @@ static void bl_intrp(EVRCContext *e, float *ex, float delay)
|
|||||||
int offset, i, coef_idx;
|
int offset, i, coef_idx;
|
||||||
int16_t t;
|
int16_t t;
|
||||||
|
|
||||||
offset = lrintf(fabs(delay));
|
offset = lrintf(delay);
|
||||||
|
|
||||||
t = (offset - delay + 0.5) * 8.0 + 0.5;
|
t = (offset - delay + 0.5) * 8.0 + 0.5;
|
||||||
if (t == 8) {
|
if (t == 8) {
|
||||||
|
Loading…
Reference in New Issue
Block a user