This is one of those things where you really need to decide for yourself if the worst possible consequences are worth it.
I know a cop. He's been attacked by several people who are on drugs. While it may seem heartless to prod with a stick, he has to make split-second decisions every day to determine if a person is harmless or is going to eat someone's face off because they are on bath salts.
Beating homeless people=always bad
Using a baton to rouse someone to make sure they haven't OD with enough reach so you aren't injured=reasonable
Yelling "BOO" at a cop without knowing any of the circumstances is just asking to be injured. Pulling out your phone and recording or doing something to ensure civil rights is completely different.