escape130: make sure cliping is done on signed values.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-12-08 05:59:36 +01:00
parent 4f79c7dd08
commit 8ff3d1ccec
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ static int escape130_decode_frame(AVCodecContext *avctx,
{-1, 1, -1, -1}, {-1, 1, -1, -1},
{1, -1, -1, -1} }; {1, -1, -1, -1} };
for (i = 0; i < 4; i++) { 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); sign_table[sign_selector][i], 0, 63);
} }
} else if (get_bits1(&gb)) { } else if (get_bits1(&gb)) {