From: Pierre Ossman Date: Tue, 8 Nov 2011 13:52:33 +0000 (+0000) Subject: The source data here is RGB triplets, not "pixels". X-Git-Tag: v1.1.90~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e3cb4a2f6c870ab91ed25e448eb95be0ecd09812;p=tigervnc.git 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 --- 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 {