Commit acc7cf70 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '9b60d919'

* commit '9b60d919':
  hevc: Allow out of bound values for num_reorder_pics

Conflicts:
	libavcodec/hevc_ps.c

See: bc21260e
See: ab296c7aMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 057d2704 9b60d919
......@@ -378,7 +378,7 @@ int ff_hevc_decode_nal_vps(HEVCContext *s)
if (vps->vps_num_reorder_pics[i] > vps->vps_max_dec_pic_buffering[i] - 1) {
av_log(s->avctx, AV_LOG_WARNING, "vps_max_num_reorder_pics out of range: %d\n",
vps->vps_num_reorder_pics[i]);
if (s->avctx->strict_std_compliance > FF_COMPLIANCE_NORMAL)
if (s->avctx->err_recognition & AV_EF_EXPLODE)
goto err;
}
}
......@@ -763,9 +763,10 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
goto err;
}
if (sps->temporal_layer[i].num_reorder_pics > sps->temporal_layer[i].max_dec_pic_buffering - 1) {
av_log(s->avctx, AV_LOG_ERROR, "sps_max_num_reorder_pics out of range: %d\n",
av_log(s->avctx, AV_LOG_WARNING, "sps_max_num_reorder_pics out of range: %d\n",
sps->temporal_layer[i].num_reorder_pics);
if (sps->temporal_layer[i].num_reorder_pics > MAX_DPB_SIZE - 1) {
if (s->avctx->err_recognition & AV_EF_EXPLODE ||
sps->temporal_layer[i].num_reorder_pics > MAX_DPB_SIZE - 1) {
ret = AVERROR_INVALIDDATA;
goto err;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment