not necessarily
according to the Baptist beliefs (which is how I was raised; excuse me while I go pour myself another beer), a sin is a sin is a sin in the eyes of God
whether you slept with someone you weren't married to, or shot someone in the face who didn't deserve it, or told some girl, "no, those pants don't make you look fat at all" matters not; to God it's all the same
if said pastor has truly repented of that sin, then it is not hypocrisy
however, if he is saying this while being currently involved in an pre/extramarital affair, that's another matter altogether