For some reason, when the encoder closed it only flushed the video encoder and not the audio encoder. Now it does both.