Resolving a null pointer error in vdpau