[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
diff --git a/common/rfb/JpegEncoder.cxx b/common/rfb/JpegEncoder.cxx
index 4542da4..7129192 100644
--- a/common/rfb/JpegEncoder.cxx
+++ b/common/rfb/JpegEncoder.cxx
@@ -142,6 +142,7 @@
     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.