any1 / neatvnc

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

Compression state flushed when switching encoding #109

Closed any1 closed 10 months ago

any1 commented 10 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.