Taxi Driver (1976)

Directed by Martin Scorsese

A mentally unstable Vietnam War veteran works as a night-time taxi driver in New York City where the perceived decadence and sleaze feed his urge for violent action.

When shown on television, the ending credits featured a black screen with a disclaimer mentioning that "the distinction between hero and villain is sometimes a matter of interpretation or misinterpretation of facts." This disclaimer was thought to have been added after the attempted assassination of Ronald Reagan in 1981, but in fact, it had been mentioned in a review of the film as early as 1979.

Wikipedia

Not merely a cameo, it is Scorcese himself in the taxi that actually sets Travis on violent streak — an ironic wink at the idea that 'movies make people violent'.