I have boiled my driftwood for 30-40 minutes then rechanging the water and reboiling it until it leaches all the tannins and other nasties. Do this till water is relatively clear. You can then let it soak it in a bucket for 24 hr. before you put it in the tank.
If the driftwood is too big to boil, you can put it in a 10% bleach solution for 24hr, then in freshwater for 24 hr, and then check pH of the water to see if it's too acidic or not.