This location is featured in the movie The Return of Captain Invincible, filmed mostly in NSW and released in 1983. It also appears in the trailer https://youtu.be/_IVCQ8wJLsM?t=48.
In the film this is depicted to be at Narrow neck in the Blue Mountains, but I have not seen this particular knife edge/gap anywhere in the region.
The valley beyond the ridge is briefly shown and it has a similar landscape to the Ruined castle, but the size and shape of the surrounding peaks don't appear to be quite right for that location.