summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
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 7ec0e6c..41bdc22 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;
OpenPOWER on IntegriCloud