I usually tolerate stuff like this for about 10 minutes before I say something, the first time polite, latter times not so much.
I distinctly remember a college course in which these two girls would just not stfu ever, it went on the entire semester and none of us said anything because the professor himself would always tell them to be quiet and they just wouldn't. Finally towards the end of the term they were particulary loud that day and the prof was going over some very critical stuff for our final and I simply lost my cool and said something to the effect of 'would you two just please shut the fvck up for 5 minutes, it's incredibly irritating, everyone hates you, have some respect for other people who want to learn and do well.' This ended in almost a standing ovation from the 50 other people in the class and as I left the class the prof pulled me aside and said 'thank you for saying what I'm not allowed to say.'
After that, there were only two or three more lectures and they never said a word.
I cannot tolerate blatent disrespect, I'm surprised the prof let it happen.