changeset 4531:8a5a3dd25390 libavcodec

fix ref_count check
author michael
date Fri, 16 Feb 2007 21:29:15 +0000
parents e47cc0486771
children c296efb7575e
files h264.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Fri Feb 16 21:27:59 2007 +0000
+++ b/h264.c	Fri Feb 16 21:29:15 2007 +0000
@@ -7922,7 +7922,7 @@
     }
     pps->ref_count[0]= get_ue_golomb(&s->gb) + 1;
     pps->ref_count[1]= get_ue_golomb(&s->gb) + 1;
-    if(pps->ref_count[0] > 32 || pps->ref_count[1] > 32){
+    if(pps->ref_count[0]-1 > 32-1 || pps->ref_count[1]-1 > 32-1){
         av_log(h->s.avctx, AV_LOG_ERROR, "reference overflow (pps)\n");
         pps->ref_count[0]= pps->ref_count[1]= 1;
         return -1;