Moved bitstream parsing out of capture function. This speeds up reconfiguration by quite a bit and fixes a memory leak