[FFmpeg-cvslog] evrcdec: fix sign error
Michael Niedermayer
git at videolan.org
Thu Jan 16 02:46:57 CET 2014
ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Sat May 4 02:47:58 2013 +0200| [2b26f8c6bf764423f644653974f7289078c2ffc9] | committer: 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: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit f18d2dff1194b34b79dc7641aafe54d1df349e40)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b26f8c6bf764423f644653974f7289078c2ffc9
---
libavcodec/evrcdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/evrcdec.c b/libavcodec/evrcdec.c
index aec652a..22f4688 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) {
More information about the ffmpeg-cvslog
mailing list