aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorConstantin Kaplinsky <const@tightvnc.com>2008-09-03 05:52:35 +0000
committerConstantin Kaplinsky <const@tightvnc.com>2008-09-03 05:52:35 +0000
commite6658f93c1a815e2ce0575337e9599346b7bd6a8 (patch)
treea0291a8ccddb8d335c9aefbf203b16a01882d9ac /common
parent4f374ffe8f99c4ee6af651f49650b8431c0d4757 (diff)
downloadtigervnc-e6658f93c1a815e2ce0575337e9599346b7bd6a8.tar.gz
tigervnc-e6658f93c1a815e2ce0575337e9599346b7bd6a8.zip
[Bugfix] If JpegCompressor could not compress the data, it did switch to StandardJpegCompressor but did not actually try to compress the same data once again. That caused sending a zero-size JPEG data block to the client.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2749 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common')
-rw-r--r--common/rfb/JpegEncoder.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/rfb/JpegEncoder.cxx b/common/rfb/JpegEncoder.cxx
index 4542da41..71291927 100644
--- a/common/rfb/JpegEncoder.cxx
+++ b/common/rfb/JpegEncoder.cxx
@@ -142,6 +142,7 @@ void JpegEncoder::writeRect(PixelBuffer* pb, const Rect& r)
delete jcomp;
jcomp = new StandardJpegCompressor;
jcomp->setQuality(qualityMap[6]);
+ jcomp->compress(pixels, &fmt, r.width(), r.height(), stride);
}
// Write Tight-encoded header and JPEG data.