From 9b095de571621463a7ee46a6750f79cfc6738975 Mon Sep 17 00:00:00 2001 From: Harish Mahendrakar Date: Thu, 15 Dec 2016 18:04:53 +0530 Subject: [PATCH] Decoder: Fixed allocation of ps_dec->ps_nbr_mb_row This needs an additional row of data to hold top row Issue is seen only for MBAff error cases which start with a field at lower resolutions Bug: 33139050 --- decoder/ih264d_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/decoder/ih264d_utils.c b/decoder/ih264d_utils.c index d356c0d..bc5c484 100644 --- a/decoder/ih264d_utils.c +++ b/decoder/ih264d_utils.c @@ -1940,8 +1940,9 @@ WORD16 ih264d_allocate_dynamic_bufs(dec_struct_t * ps_dec) if(ps_dec->u1_separate_parse) { + /* Needs one extra row of info, to hold top row data */ size = sizeof(mb_neigbour_params_t) - * 2 * ((u4_wd_mbs + 2) * u4_ht_mbs); + * 2 * ((u4_wd_mbs + 2) * (u4_ht_mbs + 1)); } else {