Moved video packet transmission into the encoder thread.