On the discriminant variety of a projective manifold