pointer fixes in initCodecContext()