Rename getptr to bufgetcodec and make it ensure the codec is ready to load