aboutsummaryrefslogtreecommitdiff
path: root/decoder/ih264d_parse_islice.c
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2016-11-22 12:24:59 +0530
committerHarish Mahendrakar <harish.mahendrakar@ittiam.com>2016-11-24 12:19:42 +0530
commitef2f525becdd4004f07466ecbb8235d0cd6eb9a4 (patch)
treefe71f78efb2e3a3ea82ecb688fba74e680cc3dfc /decoder/ih264d_parse_islice.c
parente98bd1f5a0e268ac6a4a65e6996d2a38d571ab1d (diff)
downloadlibavc-ef2f525becdd4004f07466ecbb8235d0cd6eb9a4.tar.gz
Decoder: Reset p_curr_ctxt->i1_ref_idx using memset
Since p_curr_ctxt->i1_ref_idx is not guaranteed to be 4 byte aligned, use memset instead of using it as an int pointer. On platforms that do not support unaligned stores, this change is needed Bug: 33073518 Test: Tested with -fsanitize=alignment enabled on avcdec Change-Id: I5970454be3250f6f87eab383f3b6afbf5b56f201
Diffstat (limited to 'decoder/ih264d_parse_islice.c')
-rw-r--r--decoder/ih264d_parse_islice.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/decoder/ih264d_parse_islice.c b/decoder/ih264d_parse_islice.c
index a5072e9..98905ba 100644
--- a/decoder/ih264d_parse_islice.c
+++ b/decoder/ih264d_parse_islice.c
@@ -509,9 +509,7 @@ WORD32 ih264d_parse_imb_cabac(dec_struct_t * ps_dec,
MEMSET_16BYTES(&ps_dec->pu1_left_mv_ctxt_inc[0][0], 0);
*((UWORD32 *)ps_dec->pi1_left_ref_idx_ctxt_inc) = 0;
MEMSET_16BYTES(p_curr_ctxt->u1_mv, 0);
- pi1_buf = p_curr_ctxt->i1_ref_idx;
- pi4_buf = (WORD32 *)pi1_buf;
- *pi4_buf = 0;
+ memset(p_curr_ctxt->i1_ref_idx, 0, 4);
}
if(u1_mb_type == I_4x4_MB)