[stagefright] pre-allocate input buffers and use CThread