]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] If JpegCompressor could not compress the data, it did switch to StandardJpeg...
authorConstantin Kaplinsky <const@tightvnc.com>
Wed, 3 Sep 2008 05:52:35 +0000 (05:52 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Wed, 3 Sep 2008 05:52:35 +0000 (05:52 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2749 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/JpegEncoder.cxx

index 4542da413500d421ecfa2b7441705e0c73aa57f4..71291927fc903f32377d23d59656c44b312a6d06 100644 (file)
@@ -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.