[FFmpeg-cvslog] escape130: make sure cliping is done on signed values.

Michael Niedermayer git at videolan.org
Thu Dec 8 06:03:16 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Dec  8 05:59:36 2011 +0100| [8ff3d1ccec76e25c33cf66588761ce50ac7c652a] | committer: Michael Niedermayer

escape130: make sure cliping is done on signed values.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ff3d1ccec76e25c33cf66588761ce50ac7c652a
---

 libavcodec/escape130.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c
index 1902a34..ad09192 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)) {



More information about the ffmpeg-cvslog mailing list