avcodec/hevc_ps: more complete check for vps_max_dec_pic_buffering
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 12 Jul 2014 03:07:54 +0000 (05:07 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 12 Jul 2014 05:46:08 +0000 (07:46 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hevc_ps.c

index 28defc5..ffc9931 100644 (file)
@@ -370,7 +370,7 @@ int ff_hevc_decode_nal_vps(HEVCContext *s)
         vps->vps_num_reorder_pics[i]      = get_ue_golomb_long(gb);
         vps->vps_max_latency_increase[i]  = get_ue_golomb_long(gb) - 1;
 
-        if (vps->vps_max_dec_pic_buffering[i] > MAX_DPB_SIZE) {
+        if (vps->vps_max_dec_pic_buffering[i] > MAX_DPB_SIZE || !vps->vps_max_dec_pic_buffering[i]) {
             av_log(s->avctx, AV_LOG_ERROR, "vps_max_dec_pic_buffering_minus1 out of range: %d\n",
                    vps->vps_max_dec_pic_buffering[i] - 1);
             goto err;