That would only have the effect of likely causing a lot of pain to the pig making its ears tastier for the birds. Capsaicin basically only effects mammals, birds are completely uneffected.
Either some kind of bittering agent, pets shops might have some sprays intended to stop puppies from chewing on things, or a hat.