There is a clear line that separates a riot from a protest and a rioter from a protester.
DAMAGE
When property is damaged a protest transitions to a riot.
When bystanders are hurt (damaged) a protest transitions to a riot.
When people not involved in the event are denied their rights (damage) a protest transitions to a riot.
So to be clear, there might be a protester standing next to a rioter, but the event should be classified as the more extreme of the two when both are present.
If you are interfering with agents of The State who are trying to control a riot, then YOU are part of the riot and a rioter. If you are present and things start to change from a protest to a riot, then it is YOUR responsibility to leave that venue if you don't want to be identified and treated as a rioter.
Burning down your neighborhood and robbing the local businesses IS NOT a protest. Hurting people who are not there to participate IS NOT a protest. It IS NOT protected behavior. It IS NOT acceptable behavior.