A federal appeals court ruled on Thursday that journalists risk losing their privilege to shield notes and outtakes from subpeonas if they fail to maintain their editorial independence.

The decision involved director Joe Berlinger and his 2009 documentary “Crude,” which chronicled Ecuadoran residents’ class action suit against Chevron over enviromental damage to a rainforest region of the country.

Chevron had sought for 600 hours outtakes from the movie, and Berlinger already has turned over a substantial amount of footage under a previous order, but the filmmaker argued that he was protected by journalistic privilege.

The three-judge panel of the 2nd Circuit Court of Appeals said that “while freedom of speech and of the press belongs to virtually anyone who intends to public anything (with a few narrow exceptions), all those who intend to publish do not share an equal entitlement to the press privilege from compelled disclosure.”

The appellate judges upheld U.S. District Judge Lewis Kaplan’s denying Berlinger press privilege, citing instances they say raise doubts about his independence: Steve Donziger, counsel for the Ecuadoran residents suing Chevron, solicited Berlinger to make the documentary. And Berlinger removed a scene from the final version of the project at the request of the plaintiffs’ attorneys.