summaryrefslogtreecommitdiffstats
path: root/encoder/ih264e_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoder/ih264e_api.c')
-rw-r--r--encoder/ih264e_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/encoder/ih264e_api.c b/encoder/ih264e_api.c
index e5c66ea..b68d6dc 100644
--- a/encoder/ih264e_api.c
+++ b/encoder/ih264e_api.c
@@ -2997,6 +2997,9 @@ static WORD32 ih264e_fill_num_mem_rec(void *pv_api_ip, void *pv_api_op)
/* size in bytes to slice index of all mbs of a frame */
total_size = ALIGN64(max_mb_cnt);
+ /* ih264e_update_proc_ctxt can overread by 1 at the end */
+ total_size += 1;
+
/* total size per each proc ctxt */
total_size *= MAX_CTXT_SETS;
ps_mem_rec->u4_mem_size = total_size;