A referee is restrained at an amateur game in Brazil after running onto the field brandishing a pistol.