[h264d]: check frame slot index when need to combine frame

Change-Id: I189cbde57add32e6310030859e4d7920fb3e33bc
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
This commit is contained in:
Rimon Xu
2023-02-10 15:59:29 +08:00
committed by Herman Chen
parent a05b01d84f
commit c145c84632

View File

@@ -558,6 +558,11 @@ static MPP_RET dpb_mark_malloc(H264dVideoCtx_t *p_Vid, H264_StorePic_t *dec_pic)
p_Vid->active_dpb_mark[layer_id] = cur_mark;
}
cur_mark = p_Vid->active_dpb_mark[layer_id];
if (cur_mark->slot_idx < 0) {
H264D_WARNNING("[dpb_mark_malloc] error, current mark slot idx is nagative.");
ret = MPP_NOK;
goto __FAILED;
}
if (structure == FRAME || structure == TOP_FIELD) {
cur_mark->top_used += 1;
}