The in-medium behavior of ground-state $qbar{q}$ mesons, where $q in {u,d,s,c}$, in vector and axial-vector channels is studied based on the spectral analysis for mesonic correlators at finite temperature and zero chemical potential. We first compute the correlators by solving the quark gap equations and the inhomogeneous Bethe-Salpeter equations in the rainbow-ladder approximation. Using a phenomenological ansatz, the spectral functions are extracted by fitting the correlators. By analyzing the evolution of the spectral functions with the temperature, we obtain the dissociation temperatures of mesons and discuss their relations to the critical temperature of the chiral symmetry restoration. The results show a pattern of the flavor dependence of the thermal dissociation of the mesons.