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>
pull/16/head
Michael Niedermayer 12 years ago
parent 64819bfc7a
commit f18d2dff11
  1. 2
      libavcodec/evrcdec.c

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