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
This commit is contained in:
Aayush Soni 2021-03-25 16:59:10 +05:30
parent d1c218014d
commit 3139d13ccd

View file

@ -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 */ /* The buffer in the queue is set to NULL to specify that encoding is done for that frame */
for(i = 0; i < 3; i++) for(i = 0; i < 3; i++)
{ {