From e3cb4a2f6c870ab91ed25e448eb95be0ecd09812 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 8 Nov 2011 13:52:33 +0000 Subject: [PATCH] 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 --- common/rfb/tightDecode.h | 4 +--- 1 file changed, 1 insertion(+), 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 { -- 2.39.5