NEVER fly when you have a cold or ear infection - most airlines will take ear infection seriously.
The pain of pressure on your ears can be equated to having an ice pick driven into them - it's not nice!
A burst ear drum can cause permanent lost of hearing, as mentioned by blue_stew.
It's not worth it - what may seem like a slight cold, and you feel like you could fly, could turn into 2 weeks off sick and a long recovery.
Also be careful of your balance - inner ear problems causing vertigo can also happen as a result of flying - the liquid in the inner ear becomes less in one, more in the other, resulting in vertigo, dizziness and blackouts (used to happen to me in flight - pax thought I was drunk!!) It's not as serious as an ear infection - can be fixed with some tablets over a few months.
Oh, and watch the Sudafed!! It's great stuff but taken on an empty stomach can cause some nasty side effects...anyone else had this problem?
be careful and safe!