Commit 503dd6bb authored by DRC's avatar DRC Committed by Christian Beier

Fix an issue that affects the existing Tight encoder as well as the...

Fix an issue that affects the existing Tight encoder as well as the newly-implemented Turbo encoder.

The issue is that, when using the current libvncserver source, it is impossible to disable Tight JPEG encoding.
The way Tight/Turbo viewers disable JPEG encoding is by simply not sending the Tight quality value, causing the
server to use the default value of -1.  Thus, cl->tightQualityLevel has to be set to -1 prior to processing the
encodings message for this mechanism to work.  Similarly, it is not guaranteed that the compress level will be
set in the encodings message, so it is set to a default value prior to processing the message.
parent 97001a7e
......@@ -1967,6 +1967,15 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
cl->enableSupportedMessages = FALSE;
cl->enableSupportedEncodings = FALSE;
cl->enableServerIdentity = FALSE;
#if defined(LIBVNCSERVER_HAVE_LIBZ) || defined(LIBVNCSERVER_HAVE_LIBPNG)
cl->tightQualityLevel = -1;
#if defined(LIBVNCSERVER_HAVE_LIBJPEG) || defined(LIBVNCSERVER_HAVE_TURBOVNC) || defined(LIBVNCSERVER_HAVE_LIBPNG)
cl->tightCompressLevel = TIGHT_DEFAULT_COMPRESSION;
#endif
#ifdef LIBVNCSERVER_HAVE_TURBOVNC
cl->tightSubsampLevel = TIGHT_DEFAULT_SUBSAMP;
#endif
#endif
for (i = 0; i < msg.se.nEncodings; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment