From 8ff3d1ccec76e25c33cf66588761ce50ac7c652a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 8 Dec 2011 05:59:36 +0100 Subject: [PATCH] escape130: make sure cliping is done on signed values. Signed-off-by: Michael Niedermayer --- libavcodec/escape130.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c index 1902a34e70..ad0919236d 100644 --- a/libavcodec/escape130.c +++ b/libavcodec/escape130.c @@ -225,7 +225,7 @@ static int escape130_decode_frame(AVCodecContext *avctx, {-1, 1, -1, -1}, {1, -1, -1, -1} }; for (i = 0; i < 4; i++) { - y[i] = av_clip(y_base + offset_table[difference_selector] * + y[i] = av_clip((int)y_base + offset_table[difference_selector] * sign_table[sign_selector][i], 0, 63); } } else if (get_bits1(&gb)) {