mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 05:00:37 +00:00
avcodec/hevc_ps: Override max_dec_pic_buffering when its inconsistent with num_reorder_pics
Fixes Ticket3304 Alternatively max_dec_pic_buffering could be removed completely as its not used. Based on a patch by Jose Santiago <santiago@haivision.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8bfa5f7fab
commit
ab296c7a9f
@ -763,8 +763,11 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
|
||||
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",
|
||||
sps->temporal_layer[i].num_reorder_pics);
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto err;
|
||||
if (sps->temporal_layer[i].num_reorder_pics > MAX_DPB_SIZE - 1) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto err;
|
||||
}
|
||||
sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[i].num_reorder_pics + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user