]> source.dussan.org Git - tigervnc.git/commitdiff
The source data here is RGB triplets, not "pixels".
authorPierre Ossman <ossman@cendio.se>
Tue, 8 Nov 2011 13:52:33 +0000 (13:52 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 8 Nov 2011 13:52:33 +0000 (13:52 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4785 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/tightDecode.h

index 2c5f7e40ea6355c04a236f3ce8f6d8736aa1e3d5..e604e0ec18365e9e8bc4ae22fb7e376caa4faeb3 100644 (file)
@@ -138,11 +138,9 @@ void TIGHT_DECODE (const Rect& r)
   int dataSize = r.height() * rowSize;
   int streamId = -1;
   rdr::InStream *input;
-  bool useZlib = false;
   if (dataSize < TIGHT_MIN_TO_COMPRESS) {
     input = is;
   } else {
-    useZlib = true;
     int length = is->readCompactLength();
     streamId = comp_ctl & 0x03;
     zis[streamId].setUnderlying(is, length);
@@ -182,7 +180,7 @@ void TIGHT_DECODE (const Rect& r)
         while (h > 0) {
           serverpf.bufferFromRGB((rdr::U8*)ptr, srcPtr, w, NULL);
           ptr += stride;
-          srcPtr += w * sizeof(PIXEL_T);
+          srcPtr += w * 3;
           h--;
         }
       } else {