We report a study on the confinement-induced transition of the topological defects of liquid crystals (LCs) using smectic-A LCs confined in prolate spheroids with homeotropic anchoring. Upon increasing the aspect ratio of a LC droplet, dispersed in a stretched elastomer film, the topological defect undergoes a transition from a point to a line of which the length is a function of the aspect ratio. Additionally, when the size of a droplet is larger than a certain value, the defect has a pearl-necklace-like texture. We propose a simple model to understand the formation of these defects in terms of the misorientation and undulation instability of the smectic layers