diff options
author | Harish Mahendrakar <harish.mahendrakar@ittiam.com> | 2016-05-13 19:51:35 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-05-13 19:51:35 +0000 |
commit | 3efc4664c858ce31ee21cc530d4e65092f9bb35c (patch) | |
tree | 50b636b3f59e38192c4559f1faa71e812b54cbb1 | |
parent | 4fb0fcb8cca83dec9fd160b5e27c32c9ca822817 (diff) | |
parent | a17f3104aaadcc03d496d03c669ac269713b6e06 (diff) | |
download | android_external_libavc-3efc4664c858ce31ee21cc530d4e65092f9bb35c.tar.gz android_external_libavc-3efc4664c858ce31ee21cc530d4e65092f9bb35c.tar.bz2 android_external_libavc-3efc4664c858ce31ee21cc530d4e65092f9bb35c.zip |
Decoder: Memset few structures to zero to handle error clips am: 370bd8625d am: 3fa6dfb504
am: a17f3104aa
* commit 'a17f3104aaadcc03d496d03c669ac269713b6e06':
Decoder: Memset few structures to zero to handle error clips
Change-Id: I5b1b3aa713c27b215143f58f5cfb536d779ba5c2
-rw-r--r-- | decoder/ih264d_api.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c index c264d9a..b6d4e35 100644 --- a/decoder/ih264d_api.c +++ b/decoder/ih264d_api.c @@ -889,6 +889,43 @@ void ih264d_init_decoder(void * ps_dec_params) dec_struct_t * ps_dec = (dec_struct_t *)ps_dec_params; dec_slice_params_t *ps_cur_slice; pocstruct_t *ps_prev_poc, *ps_cur_poc; + WORD32 size; + + size = sizeof(pred_info_t) * 2 * 32; + memset(ps_dec->ps_pred, 0 , size); + + size = sizeof(disp_mgr_t); + memset(ps_dec->pv_disp_buf_mgr, 0 , size); + + size = sizeof(buf_mgr_t) + ithread_get_mutex_lock_size(); + memset(ps_dec->pv_pic_buf_mgr, 0, size); + + size = sizeof(dec_err_status_t); + memset(ps_dec->ps_dec_err_status, 0, size); + + size = sizeof(sei); + memset(ps_dec->ps_sei, 0, size); + + size = sizeof(dpb_commands_t); + memset(ps_dec->ps_dpb_cmds, 0, size); + + size = sizeof(dec_bit_stream_t); + memset(ps_dec->ps_bitstrm, 0, size); + + size = sizeof(dec_slice_params_t); + memset(ps_dec->ps_cur_slice, 0, size); + + size = MAX(sizeof(dec_seq_params_t), sizeof(dec_pic_params_t)); + memset(ps_dec->pv_scratch_sps_pps, 0, size); + + size = sizeof(ctxt_inc_mb_info_t); + memset(ps_dec->ps_left_mb_ctxt_info, 0, size); + + size = (sizeof(neighbouradd_t) << 2); + memset(ps_dec->ps_left_mvpred_addr, 0 ,size); + + size = sizeof(buf_mgr_t) + ithread_get_mutex_lock_size(); + memset(ps_dec->pv_mv_buf_mgr, 0, size); /* Free any dynamic buffers that are allocated */ ih264d_free_dynamic_bufs(ps_dec); |