From 54bd23ea0824f49d69833de44029e7df1dae436f Mon Sep 17 00:00:00 2001 From: Harish Mahendrakar Date: Mon, 16 Jan 2017 14:43:42 +0530 Subject: Decoder: Fixed initialization of first_slice_in_pic To handle some errors, first_slice_in_pic was being set to 2. This is now cleaned up and first_slice_in_pic is set to 1 only once per pic. This will ensure picture level initializations are done only once even in case of error clips Bug: 33717589 Bug: 33551775 Bug: 33716442 Bug: 33677995 AOSP-Change-Id: If341436b3cbaa724017eedddd88c2e6fac36d8ba CVE-2017-0555 Change-Id: Ifecf8e8cf6a257eaffdc8411e6af44962b554d72 (cherry picked from commit 0b23c81c3dd9ec38f7e6806a3955fed1925541a0) --- decoder/ih264d_parse_headers.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'decoder/ih264d_parse_headers.c') diff --git a/decoder/ih264d_parse_headers.c b/decoder/ih264d_parse_headers.c index 4d64f3e..bc4ace4 100644 --- a/decoder/ih264d_parse_headers.c +++ b/decoder/ih264d_parse_headers.c @@ -1083,13 +1083,6 @@ WORD32 ih264d_parse_nal_unit(iv_obj_t *dec_hdl, == IDR_SLICE_NAL), u1_nal_ref_idc, ps_dec); - if((ps_dec->u4_first_slice_in_pic != 0)&& - ((ps_dec->ps_dec_err_status->u1_err_flag & REJECT_CUR_PIC) == 0)) - { - /* if the first slice header was not valid set to 1 */ - ps_dec->u4_first_slice_in_pic = 1; - } - if(i_status != OK) { return i_status; -- cgit v1.2.3