fixing coverity warnig CID: 253 (reading over the end of the aspect_ratio array for...
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Mar 2006 23:46:47 +0000 (23:46 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Mar 2006 23:46:47 +0000 (23:46 +0000)
Originally committed as revision 5163 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264.c

index b923d50..f120858 100644 (file)
@@ -7104,7 +7104,7 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){
         if( aspect_ratio_idc == EXTENDED_SAR ) {
             sps->sar.num= get_bits(&s->gb, 16);
             sps->sar.den= get_bits(&s->gb, 16);
-        }else if(aspect_ratio_idc < 16){
+        }else if(aspect_ratio_idc < 14){
             sps->sar=  pixel_aspect[aspect_ratio_idc];
         }else{
             av_log(h->s.avctx, AV_LOG_ERROR, "illegal aspect ratio\n");