Decoder: Fixed initialization of first_slice_in_pic

To handle some errors, first_slice_in_pic was being set to 2.
This is now cleaned up and first_slice_in_pic is set to 1 only once per pic.
This will ensure picture level initializations are done only once even in case
of error clips

Bug: 33717589
Bug: 33551775
Bug: 33716442
Bug: 33677995

Change-Id: If341436b3cbaa724017eedddd88c2e6fac36d8ba

WORD32 ih264d_set_flush_mode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
{

 dec_struct_t * ps_dec;
 ivd_ctl_flush_op_t *ps_ctl_op = (ivd_ctl_flush_op_t*)pv_api_op;
    ps_ctl_op->u4_error_code = 0;

    ps_dec = (dec_struct_t *)(dec_hdl->pv_codec_handle);
    UNUSED(pv_api_ip);
 /* ! */
 /* Signal flush frame control call */
    ps_dec->u1_flushfrm = 1;

 if(  ps_dec->u1_init_dec_flag == 1)
 {

    ih264d_release_pics_in_dpb((void *)ps_dec,
                               ps_dec->u1_pic_bufs);
    ih264d_release_display_bufs(ps_dec);
 }

    ps_ctl_op->u4_error_code =
 ((ivd_ctl_flush_op_t*)ps_dec->pv_dec_out)->u4_error_code; //verify the value

 return IV_SUCCESS;

}

WORD32 ih264d_set_flush_mode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
{

 dec_struct_t * ps_dec;
 ivd_ctl_flush_op_t *ps_ctl_op = (ivd_ctl_flush_op_t*)pv_api_op;
    ps_ctl_op->u4_error_code = 0;

    ps_dec = (dec_struct_t *)(dec_hdl->pv_codec_handle);
    UNUSED(pv_api_ip);
 /* ! */
 /* Signal flush frame control call */
    ps_dec->u1_flushfrm = 1;

 if(  ps_dec->u1_init_dec_flag == 1)
 {

    ih264d_release_pics_in_dpb((void *)ps_dec,
                               ps_dec->u1_pic_bufs);
    ih264d_release_display_bufs(ps_dec);
 }

    ps_ctl_op->u4_error_code =
 ((ivd_ctl_flush_op_t*)ps_dec->pv_dec_out)->u4_error_code; //verify the value

 return IV_SUCCESS;

}
