From e88c22c34cd93eef75ae473c4a35af775546b8fe Mon Sep 17 00:00:00 2001 From: Aayush Soni Date: Thu, 25 Mar 2021 16:59:10 +0530 Subject: [PATCH] encoder: fix null buffer dereferencing Do not set the picture type as NA for the last frame in encoding order. Bug: 180219345 Test: POC in bug descriptions Test: atest CtsMediaV2TestCases:CodecEncoderTest Test: atest VtsHalMediaC2V1_0TargetVideoEncTest Change-Id: I57ee7db9e2e55fba2666a6aaa4002ef31276e4b9 --- encoder/ih264e_utils.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/encoder/ih264e_utils.c b/encoder/ih264e_utils.c index 2196a64..239271e 100644 --- a/encoder/ih264e_utils.c +++ b/encoder/ih264e_utils.c @@ -445,11 +445,6 @@ WORD32 ih264e_input_queue_update(codec_t *ps_codec, } } - if (ps_enc_buff->u4_is_last) - { - ps_codec->pic_type = PIC_NA; - } - /* The buffer in the queue is set to NULL to specify that encoding is done for that frame */ for(i = 0; i < 3; i++) {