Video encoding/decoding thread is ready and seems to be working. There are some memory leaks in this new scheme.