Decoder: Treat first slice in a picture as part of new picture always

This is needed to decode streams with consecutive IDRs.

Bug: 34097231
Test: successful run of POC in security bug
Change-Id: Ib737a4ef4b8c5bb7a57c90292102dd28af0615fe
diff --git a/decoder/ih264d_parse_slice.c b/decoder/ih264d_parse_slice.c
index 6e29aa7..7c4b703 100644
--- a/decoder/ih264d_parse_slice.c
+++ b/decoder/ih264d_parse_slice.c
@@ -1302,7 +1302,7 @@
     i1_is_end_of_poc = 1;
     ps_dec->ps_dec_err_status->u1_err_flag &= MASK_REJECT_CUR_PIC;
 
-    if(ps_dec->u4_first_slice_in_pic == 0)
+    if(ps_dec->u4_first_slice_in_pic != 2)
     {
         i1_is_end_of_poc = ih264d_is_end_of_pic(u2_frame_num, u1_nal_ref_idc,
                                             &s_tmp_poc, &ps_dec->s_cur_pic_poc,
@@ -1310,23 +1310,6 @@
                                             u1_nal_unit_type, u4_idr_pic_id,
                                             u1_field_pic_flag,
                                             u1_bottom_field_flag);
-
-        /* since we support only Full frame decode, every new process should
-         * process a new pic
-         */
-        if((ps_dec->u4_first_slice_in_pic == 2) && (i1_is_end_of_poc == 0))
-        {
-            /* if it is the first slice is process call ,it should be a new frame. If it is not
-             * reject current pic and dont add it to dpb
-             */
-            ps_dec->ps_dec_err_status->u1_err_flag |= REJECT_CUR_PIC;
-            i1_is_end_of_poc = 1;
-        }
-        else
-        {
-            /* reset REJECT_CUR_PIC */
-            ps_dec->ps_dec_err_status->u1_err_flag &= MASK_REJECT_CUR_PIC;
-        }
     }
 
     /*--------------------------------------------------------------------*/