any1 / neatvnc

A liberally licensed VNC server library with a clean interface
ISC License
120 stars 30 forks source link

Compression state flushed when switching encoding #109

Closed any1 closed 8 months ago

any1 commented 8 months ago

Clients expect zlib streams to be preserved when switching encodings.

This is what causes the the RealVNC client to fail to connect sometimes. The screen flickers a bit and it shows some Zlib error. It happens because it switches between ZRLE and raw while starting up, possibly for trying to figure out which is faster.

This is also a problem for ZRLE, but H264 should be fine because it will always send a key-frame after a new encoder has been allocated.