Make sure that apv_bufs[0] and u4_is_last always are set

When encoding in header mode, the s_inp_buf struct that was written
to ps_video_encode_op->s_ive_op.s_inp_buf was completely uninitialized.

In ih264e_input_queue_update, make sure to initialize u4_is_last
when skipping frames.

Bug: 22860270

Change-Id: I87e677acd00baf4f732ca7d35ee192e7f1f73994
diff --git a/encoder/ih264e_encode.c b/encoder/ih264e_encode.c
index 4697d73..e7057dc 100644
--- a/encoder/ih264e_encode.c
+++ b/encoder/ih264e_encode.c
@@ -361,7 +361,11 @@
         ps_codec->i4_gen_header = 0;
 
         /* send the input to app */
-        ps_video_encode_op->s_ive_op.s_inp_buf = s_inp_buf.s_raw_buf;
+        ps_video_encode_op->s_ive_op.s_inp_buf = ps_video_encode_ip->s_ive_ip.s_inp_buf;
+        ps_video_encode_op->s_ive_op.u4_timestamp_low = ps_video_encode_ip->s_ive_ip.u4_timestamp_low;
+        ps_video_encode_op->s_ive_op.u4_timestamp_high = ps_video_encode_ip->s_ive_ip.u4_timestamp_high;
+
+        ps_video_encode_op->s_ive_op.u4_is_last = ps_video_encode_ip->s_ive_ip.u4_is_last;
 
         /* send the output to app */
         ps_video_encode_op->s_ive_op.output_present  = 1;
diff --git a/encoder/ih264e_utils.c b/encoder/ih264e_utils.c
index 8623949..82a96d0 100644
--- a/encoder/ih264e_utils.c
+++ b/encoder/ih264e_utils.c
@@ -206,6 +206,7 @@
                     && !ps_codec->i4_last_inp_buff_received)
     {
         ps_enc_buff->s_raw_buf.apv_bufs[0] = NULL;
+        ps_enc_buff->u4_is_last = ps_ive_ip->u4_is_last;
         return 0;
     }
 
@@ -223,7 +224,11 @@
                         ps_codec->s_rate_control.pps_time_stamp,
                         ps_codec->s_rate_control.pps_frame_time);
 
-        if (skip_src) return 1;
+        if (skip_src)
+        {
+            ps_enc_buff->u4_is_last = ps_ive_ip->u4_is_last;
+            return 1;
+        }
     }
 
     /***************************************************************************
@@ -278,6 +283,7 @@
                     < (WORD32)(ps_codec->s_cfg.u4_num_bframes))
     {
         ps_enc_buff->s_raw_buf.apv_bufs[0] = NULL;
+        ps_enc_buff->u4_is_last = 0;
         return 0;
     }