aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-02-16 21:29:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-02-16 21:29:15 +0000
commit0565c648343cb7d1220da903308ff0aaf89d96b8 (patch)
tree199fce608113302ae387fe79f7f8532d2249f2ef /libavcodec/h264.c
parent65a0f3fd4756e6214e519892de4abd8fcd65ea55 (diff)
downloadffmpeg-0565c648343cb7d1220da903308ff0aaf89d96b8.tar.gz
fix ref_count check
Originally committed as revision 7997 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7ec0e6c8a5..41bdc220e0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -7922,7 +7922,7 @@ static inline int decode_picture_parameter_set(H264Context *h, int bit_length){
}
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;