Skip to content
Snippets Groups Projects
Commit f18d2dff authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 64819bfc
No related branches found
No related tags found
No related merge requests found
...@@ -374,7 +374,7 @@ static void bl_intrp(EVRCContext *e, float *ex, float delay) ...@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment