diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-10-06 22:23:04 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-10-06 22:23:04 +0000 |
commit | aa1b7f6d5875f7323173db211922c8a8a8200922 (patch) | |
tree | c648bf7eeb74aeac43906c6863bbab1d07033e8d | |
parent | 65dad9df3e3ec4c15987d8ade6a38f1ac34bcc4e (diff) | |
parent | bbe80a782f0687c82a15e41c60786794917460e2 (diff) | |
download | libavc-android-mainline-12.0.0_r58.tar.gz |
Snap for 7799923 from bbe80a782f0687c82a15e41c60786794917460e2 to mainline-os-statsd-releaseandroid-mainline-12.0.0_r58android12-mainline-statsd-release
Change-Id: Ic51e9abf9247736b37a363c3c242bc6deab38869
-rw-r--r-- | encoder/ih264e_api.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/encoder/ih264e_api.c b/encoder/ih264e_api.c index 53067e0..1f69e3e 100644 --- a/encoder/ih264e_api.c +++ b/encoder/ih264e_api.c @@ -4132,6 +4132,13 @@ static WORD32 ih264e_init_mem_rec(iv_obj_t *ps_codec_obj, /* mem records */ ps_mem_rec_base = ps_ip->s_ive_ip.ps_mem_rec; + /* memset all allocated memory, except the first one. First buffer (i.e. i == MEM_REC_IV_OBJ) + is initialized by application before calling this init function */ + for (i = MEM_REC_CODEC; i < MEM_REC_CNT; i++) + { + ps_mem_rec = &ps_mem_rec_base[i]; + memset(ps_mem_rec->pv_base, 0, ps_mem_rec->u4_mem_size); + } /* Init mem records */ ps_mem_rec = &ps_mem_rec_base[MEM_REC_CODEC]; |