[FFmpeg-cvslog] rv30_decode_intra_types: make check tighter

Michael Niedermayer git at videolan.org
Sat Oct 13 03:38:58 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 03:21:23 2012 +0200| [9f9307ff2a6cc769abea857a1c8535a3991bfe2c] | committer: Michael Niedermayer

rv30_decode_intra_types: make check tighter

This makes no differnce as the affected values cannot occur
But it will likely help static analyzers

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

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

 libavcodec/rv30.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index b033d1c..df2160a 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -79,7 +79,7 @@ static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t
     for(i = 0; i < 4; i++, dst += r->intra_types_stride - 4){
         for(j = 0; j < 4; j+= 2){
             int code = svq3_get_ue_golomb(gb) << 1;
-            if(code >= 81U*2U){
+            if(code > 80U*2U){
                 av_log(r->s.avctx, AV_LOG_ERROR, "Incorrect intra prediction code\n");
                 return -1;
             }



More information about the ffmpeg-cvslog mailing list