Police officers often use crowd-control methods to ensure the safety of the protestors. Tactics such as tear gas, rubber bullets, and pepper spray are used in extreme cases to avoid violence from escalating among protestors and business owners during riots. In most cases, the use of these tactics is for self-defense against aggressive protestors.
Many police officers are civil to protestors, engaging in conversation about the protests, and providing food and water for those who are in need. The media is skewed in it's portrayal of the behavior of police officers during protests, and the videos that surface the internet are taken out of context. There are many videos of police officers demonstrating solidarity with the protesters, and ven marching with them.
If the media cared about representing these protests honestly, it would include these moments of humanity in the reporting and not just the violence.