summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2016-05-13 19:48:55 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-05-13 19:48:55 +0000
commita17f3104aaadcc03d496d03c669ac269713b6e06 (patch)
tree323c856633818a269a083c1044a51331a1c42ca0
parent0c202440735485f4e4eda631267a70eb5f934297 (diff)
parent3fa6dfb5048f6efaabf3f1cf5da70b53eedb8f7d (diff)
downloadandroid_external_libavc-a17f3104aaadcc03d496d03c669ac269713b6e06.tar.gz
android_external_libavc-a17f3104aaadcc03d496d03c669ac269713b6e06.tar.bz2
android_external_libavc-a17f3104aaadcc03d496d03c669ac269713b6e06.zip
Decoder: Memset few structures to zero to handle error clips am: 370bd8625d
am: 3fa6dfb504 * commit '3fa6dfb5048f6efaabf3f1cf5da70b53eedb8f7d': Decoder: Memset few structures to zero to handle error clips Change-Id: I466a1bea95cb6b89a12ffd8530a533817263432b
-rw-r--r--decoder/ih264d_api.c37
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);