]> source.dussan.org Git - tigervnc.git/commitdiff
Default compression level should be interpreted as high
authorPierre Ossman <ossman@cendio.se>
Thu, 12 Feb 2015 13:57:05 +0000 (14:57 +0100)
committerPierre Ossman <ossman@cendio.se>
Fri, 27 Feb 2015 08:22:21 +0000 (09:22 +0100)
(cherry picked from commit 4daa7b1172cd4606b60f8245831bc5aa155c4b9e)

common/rfb/EncodeManager.cxx

index 8e328a1cfc2e6009963a8f431ba19c353b95d7f9..a9a4781e71b502485c504a1755c98bad272d34e7 100644 (file)
@@ -482,7 +482,7 @@ void EncodeManager::writeSubRect(const Rect& rect, const PixelBuffer *pb)
 
   // Special exception inherited from the Tight encoder
   if (activeEncoders[encoderFullColour] == encoderTightJPEG) {
-    if (conn->cp.compressLevel < 2)
+    if ((conn->cp.compressLevel != -1) && (conn->cp.compressLevel < 2))
       maxColours = 24;
     else
       maxColours = 96;