Closed any1 closed 1 week ago
24 bit bpp is invalid according to the RFB specification. Are you sure you don't mean depth?
We abort on invalid pixel formats as a way to detect that we are likely out of sync with the protocol stream for some reason. So those checks are not something we want to remove as it makes things much harder to debug.
No, I meant bpp, but you are right. I didn't even think to check the spec for this. Thanks for reminding me of this fact!
I wasn't suggesting to remove the checks though, just request a different format is the checks fail. But if the server is out of spec, it's valid to fail.
When the server reports a pixel format with bpp set to 24, vncviewer complains about an "invalid pixel format". Instead of failing, the client could override the server's pixel format preference, but it does not do this.
WayVNC running on NVidia hardware will report a preferred bpp of 24. This is simply because the graphics driver will supply 24 bit buffers.
To Reproduce Compile the following and run it:
Expected behavior The client is free to request any format that it prefers. If it can't cope with what the server suggests, it should pick something that works before requesting the first framebuffer.
Client:
Server:
wayvnc
(according to user)Additional context The issue was reported by @drigoskalwalker here: https://github.com/any1/wayvnc/issues/335