8svx: fix delta_decode cliping limits
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Oct 2012 23:52:29 +0000 (01:52 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Oct 2012 23:52:29 +0000 (01:52 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/8svx.c

index 1b03ba1..c034dd6 100644 (file)
@@ -74,9 +74,9 @@ static int delta_decode(int8_t *dst, const uint8_t *src, int src_size,
 
     while (n--) {
         uint8_t d = *src++;
-        val = av_clip(val + table[d & 0x0f], -127, 128);
+        val = av_clip(val + table[d & 0x0f], -128, 127);
         *dst++ = val;
-        val = av_clip(val + table[d >> 4]  , -127, 128);
+        val = av_clip(val + table[d >> 4]  , -128, 127);
         *dst++ = val;
     }