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
1 file changed