A race condition can occur in obs-outputs where the send_thread is in the process of (re)connecting but the encoder was shut down in the meantime. This causes the expected header data to be garbage, resulting in a crash.