Browse Source

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>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
f18d2dff11
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/evrcdec.c

+ 1
- 1
libavcodec/evrcdec.c View File

@@ -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) {


Loading…
Cancel
Save