From 56b5563f3eecb845148a2948beb3f07343784f3f Mon Sep 17 00:00:00 2001 From: Harish Mahendrakar Date: Tue, 20 Dec 2016 11:08:57 +0530 Subject: [PATCH] Decoder: Fix in the case of error in the first MB in frame. In case of error in first MB in a frame, ps_dec->i4_submb_ofst was decremented to result in negative offsets. Bug: 33351708 --- decoder/ih264d_parse_pslice.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/decoder/ih264d_parse_pslice.c b/decoder/ih264d_parse_pslice.c index 75b1010..ba72fcf 100644 --- a/decoder/ih264d_parse_pslice.c +++ b/decoder/ih264d_parse_pslice.c @@ -1608,13 +1608,13 @@ WORD32 ih264d_mark_err_slice_skip(dec_struct_t * ps_dec, ps_dec->u1_mb_ngbr_availablity = ps_cur_mb_info->u1_mb_ngbr_availablity; - // Going back 1 mb - ps_dec->pv_parse_tu_coeff_data = ps_dec->pv_prev_mb_parse_tu_coeff_data; - ps_dec->u2_cur_mb_addr--; - ps_dec->i4_submb_ofst -= SUB_BLK_SIZE; - if(u1_num_mbs) { + // Going back 1 mb + ps_dec->pv_parse_tu_coeff_data = ps_dec->pv_prev_mb_parse_tu_coeff_data; + ps_dec->u2_cur_mb_addr--; + ps_dec->i4_submb_ofst -= SUB_BLK_SIZE; + // Parse/decode N-MB left unparsed if (ps_dec->u1_pr_sl_type == P_SLICE || ps_dec->u1_pr_sl_type == B_SLICE)