avcodec/hevc_ps: do not loose all reference to pointers still in use

Fixes leaving a pointer to unreferenced memory
Fixes Ticket 3115

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>