vdpau: fix deadlock if decoder is closed while refresh rate changes