(Do you generally agree with this?)
If you see someone in a situation* that would cause embarrassment if you gossiped about it, and if they see you seeing them - (1) decide right away not to talk about it and then (if appropriate i.e. it won’t cause more embarrassment) (2) tell them that you aren’t going to talk about it.
* Assuming that this isn’t some dark sin that someone in authority should hear about. I’m thinking more along the lines of an inadvertent action.