I've heard that too, but I'm fairly certain the cast had to sign a 6-year contract at the beginning didn't they? Patrick Stewart has said repeatedly that the only reason he took on the job at first was because he was assured that a 6-year contract was meaningless, as no one expected the show to be a success.
It was a standard five-year contract, locking them all into a salary scale that would increment each year but, after the fifth year, they all had to renegotiate
new contracts. Getting actors' agents to agree to new salaries at that point is difficult, because
new shows would then be offering much higher rates than the older production could afford. What helps is that standing sets are usually costed over five years, so some of that part of the budget can be diverted to actors' salaries, improved dressing room trailers, etc. They also had to negotiate a Season Seven contract.
But pre-agreed clauses in the standard five-year contract allows the employer, ie. Paramount, to choose to
not take up the option on a second year, whereas if the actor wished to leave (Crosby in Season One, Wheaton in Season Four), they have
to seek to be released from the contract. The studio can refuse such a request. Similarly, if a show tanks during its first season, and is cancelled, the actors don't get paid for four more years.
Remember Farrah Fawcett-Majors, who asked to be released from "Charlie's Angels" after one year. The show was such a huge hit, and she was considered to be such a crucial part of its success, her production house
refused to release her. She left anyway - Cheryl Ladd was added to the series as Jill's sister - and Farrah was eventually ordered by the courts to return to the series for a certain number of guest spots.
By the way, there were rumblings that Patrick Stewart was unhappy with his contract and did some kind of negotiation during the hiatus between "The Best of Both Worlds" Parts 1 & 2. His transformation as Locutus was a safety net in case he negotiated to leave. Jennifer Lien (Kes in VOY) was released before the end of her five-year contract. Terry Farrell successfully negotiated a sixth year on DS9, but no agreement could be reached on Season Seven so she kept to her promise and walked.