[FFmpeg-cvslog] evrcdec: fix sign error
Michael Niedermayer
git at videolan.org
Sat May 4 03:14:08 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 4 02:47:58 2013 +0200| [f18d2dff1194b34b79dc7641aafe54d1df349e40] | 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>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f18d2dff1194b34b79dc7641aafe54d1df349e40
---
libavcodec/evrcdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/evrcdec.c b/libavcodec/evrcdec.c
index f0e594f..f104e33 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