Media footage showing a homeless man being bashed by a South Australian police officer was taken after the man had threatened and assaulted the officer, a magistrate has been told.
Prosecutor Senior Sergeant Fred Wojtasik said the footage had been described as depicting "inappropriate force" being used by a police officer.
But he said there was a distinction between the offences said to have been committed by Shaun Robert Jones and what followed when police used a baton.
He was opening the prosecution case on Tuesday in the Adelaide Magistrates Court.
Jones, 41, and Christopher John Mackie, 41, who have denied assaulting police and resisting arrest in December last year at Whitmore Square in the city's centre.
The TV vision showed Constable Matthew Schwarz using his baton "to control" both men, said Sgt Wojtasik.
He said Const Schwarz and his female partner were conducting inquiries about drug dealing near homeless shelters, when they went to the square.
They saw Jones and Mackie, but when they tried to speak to them, Jones allegedly repeatedly swore, made death threats and threw "air punches".
Const Schwarz eventually used capsicum spray on both men, but after being kicked by Jones and falling to the ground, he used his baton, the prosecutor said.
"The defendant Jones is struck on three occasions and Mackie once by Schwarz with the baton," he said.
The hearing is continuing.