aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-11-08 13:52:33 +0000
committerPierre Ossman <ossman@cendio.se>2011-11-08 13:52:33 +0000
commite3cb4a2f6c870ab91ed25e448eb95be0ecd09812 (patch)
tree2842eb9a07d9b0a3ac0333632e5c9495691af9be
parentbbf955ebd77320fb7f95efc3ac140feced109ed8 (diff)
downloadtigervnc-e3cb4a2f6c870ab91ed25e448eb95be0ecd09812.tar.gz
tigervnc-e3cb4a2f6c870ab91ed25e448eb95be0ecd09812.zip
The source data here is RGB triplets, not "pixels".
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4785 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--common/rfb/tightDecode.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/rfb/tightDecode.h b/common/rfb/tightDecode.h
index 2c5f7e40..e604e0ec 100644
--- a/common/rfb/tightDecode.h
+++ b/common/rfb/tightDecode.h
@@ -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 {