I think I know the film you are talking about. Your 2nd clue gave it away, but I can't remember the title or anybody in it, but I do give a list of every non-G rated film I've seen. So, let me go through that list and maybe the title will pop up.
I found the film I was seeking. It was "Nate and Hayes" from 1983 with Tommy Lee Jones as Captain Bully Hayes and Michael O'Keefe as Nathaniel (Nate) Williamson. Also starring Jenny Seagrove. Looking at the info I had for it, I liked it better than I thought. Thinking it was no worst than mediocre. Which surprised me, as I remember so much about the film. Mediocre films I tend to forget. It is only the best and the worst that I tend to remember.
One of the many pirate films out at that time. Others being "Pirates," "Yellowbeard," "Swashbuckler," "The Pirate Movie," and "Cutthroat Island." All of 'em failed at the box office. And I can see why. I have seen most of 'em, and they are terrible. It would take "Pirates of the Caribbean" to revive the pirate picture franchise.
And, oh yes. Captain Bully Hayes actually existed.
I hope this helps.