In previous publications we have reported on polarization-sensitive optical coherence tomography (PS-OCT) systems that measure and image retardation and axis orientation of birefringent samples with only a single input polarization state. This method requires that the sample is illuminated by circularly polarized light. In the case of retinal imaging, the retina is measured through the birefringent cornea, which causes a deviation of the sampling beam from the circular polarization state. To obtain undistorted birefringence patterns of the retina by PS-OCT, the corneal birefringence has to be compensated. We report on a software-based corneal birefringence compensation that uses the polarization state of the light backscattered at the retinal surface to measure the corneal birefringence. This information is used to numerically compensate the corneal birefringence. Contrary to hardware-based solutions, our method accounts for local variations of the corneal birefringence. We implemented the method in a state of the art spectral domain PS-OCT system and demonstrate it in a test sample and human retina in vivo.