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.
pull/1/head
DRC 13 years ago committed by Christian Beier
parent 97001a7e7b
commit 503dd6bb69

@ -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++) {

Loading…
Cancel
Save