A race occurs between the encoder and the main thread when changing resolution.
If the encoder is already encoding something when the resolution change happens, a frame of a wrong size can be sent right after the resolution has changed. That frame needs to be dropped.
A race occurs between the encoder and the main thread when changing resolution.
If the encoder is already encoding something when the resolution change happens, a frame of a wrong size can be sent right after the resolution has changed. That frame needs to be dropped.