Commit f18d2dff authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 64819bfc
......@@ -374,7 +374,7 @@ static void bl_intrp(EVRCContext *e, float *ex, float delay)
int offset, i, coef_idx;
int16_t t;
offset = lrintf(fabs(delay));
offset = lrintf(delay);
t = (offset - delay + 0.5) * 8.0 + 0.5;
if (t == 8) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment