aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-04 02:47:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-04 02:50:30 +0200
commitf18d2dff1194b34b79dc7641aafe54d1df349e40 (patch)
tree26b863a7dc5e189d61d6c00ffc89963488b6483f /libavcodec
parent64819bfc7a1f622eab88c8962e02c9e2941bb42d (diff)
downloadffmpeg-f18d2dff1194b34b79dc7641aafe54d1df349e40.tar.gz
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/evrcdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/evrcdec.c b/libavcodec/evrcdec.c
index f0e594fdde..f104e3313b 100644
--- a/libavcodec/evrcdec.c
+++ b/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) {