Bricked up into a cave on side of a mountain?

Can’t remember what this film is as I saw it when I was young but here is all the info I can remember.

There is a sort of doorway entrance to a jail/prison/cave type cell and a man is talking and he looks bedraggled and I think he had done something wrong and was being punished. Cell looked like old stone work dank cold and wet and windy exposed to elements almost like a cave

A man is on other side of the doorway(he may have been wearing some sort of fancy knights type armour) bricking up the doorway with bricks and rocks and cement saying stuff to the guy and eventually there’s about a head height gap left small hole and the men exchange some more words then the last brick is placed in and doorway totally sealed bricked in.

The prisoner then sort of turns around and camera moves and you see it’s not really a cave but more of a ledge in the side of a very high up mountain and there’s no back to the cell and just a ledge that opens out and is very high up wet and windy and cold looking and no way to escape unless jump to your death kinda thing.

Movie was in colour and think would be an 80s movie. And sort of fantasy type of movie like willow or similar type fantasy.

Hope someone can help as it’s annoyed me for years thanks in advance

I did not fully understand your description, but it reminded me of this one.