No. He was being detained for breaking the law (I think, in this case, speeding).
Both were wrong. When pulled over, you comply with the police officer's request within your constitutional rights. over 250 police officers have been shot this year. The officer has no idea if the driver has his tinted window up and is reaching for a gun in the glove box or under the seat. It is for both of their safety. The officer is also OK with detaining the driver if he does not comply with detaining him. But you don't have to drag him out of the car and slam him to the ground.
Details of stops are complex and the scrutiny of lots of lawsuits. Cops have a lot of leeway in terms of search and seizure but need probable cause. The best thing to do is to just do whatever the officer says to do. However, if he asks if he can search the car the answer is no. If he asks if you know why you were detained the answer is no. If the officer asks if you've taken any drugs or had a drink the answer is no. (or no answer at all citing your constitutional rights). Officers can and do lie all the time. They can tell you that you have to answer them and take a breathalyzer. You do not (although refusing the breathalizer may result in a suspension of your license but the judges often drop this or give limited driving capability, like to/from work or kid's events). They are allowed to. They can say "I smell booze/pot on you" even when they don't. They can say they saw you swerving, even when they didn't. They can say they got a call about an erratic driver even when they didn't.
But if an officer tells you to stay in the car, turn off the ignition, keep your hands on the wheel and/or leave your window rolled down you do those things. They are not protected by constitutional rights.
My wife has done a lot of defense work on these cases in Ohio. For example, she had a guy that got pulled over for speeding. The officer said he smelled pot and called in a K-9 when the guy wouldn't give permission to search the vehicle. It took 25 minutes for the K-9 to get there but it smelled pot. Upon searching the vehicle, they found a brick in the trunk. The charges were dropped because there was no evidence of pot being smoked in the car (no ashes or blunts) making the search illegal. And in Ohio, if the dog just happens to catch a whiff of the pot, you can search. However, you cannot call in to get a K-9 as this is a search. It is kind of crazy. In another case, a guy was hit with a DUI for being on pain relief medicine. He was pulled over for driving erratically. Upon review, his tire hit the yellow line in the middle of the street by mere inches. Perhaps two or three. Had that not happened, the case would have been thrown out as an illegal stop. In another, a woman turned left at around midnight on her way home from work as a chef. She crossed over the yellow line that denoted the turning lane and a cop pulled her over and hit her with a DUI. The stop was considered legal because her tire crossed the line (try turning without crossing a lane line). In another, a guy got hit with possession because he had pot ashes in the ashtray. He was stopped because the bumper of his car was over the crosswalk in the middle of the night when he stopped at a red light.
Cops will find a reason to pull you over if the vehicle or operation appears to be suspicious, especially in the middle of the night. Just do what they say, don't talk, and do not agree to any kind of search. If anything unusual, tell the officer you want to call your attorney. You are also ok to record the stop on your mobile phone but be prepared that the cop can impound your phone as evidence. Just so you know, my wife has had several officers and prosecutors reprimanded and even fired. At the same time, she has ZERO tolerance for criminals.