diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-10-16 13:03:14 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-10-16 13:03:14 +0200 |
commit | 1e61325deaf01771b661e3fa3fbe658ff6539147 (patch) | |
tree | 45cf1cac87c3232c196c565649ea4b86e8d90d7a | |
parent | f4a971edf41032da98b4b00334be24f637e21540 (diff) | |
download | tigervnc-1e61325deaf01771b661e3fa3fbe658ff6539147.tar.gz tigervnc-1e61325deaf01771b661e3fa3fbe658ff6539147.zip |
Flush entire JPEG buffer, ignoring state
libjpeg doesn't update the buffer state before calling the
empty_output_buffer() callback so we need to flush everything,
not just the apparent size.
-rw-r--r-- | common/rfb/JpegCompressor.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rfb/JpegCompressor.cxx b/common/rfb/JpegCompressor.cxx index 5df0039e..c8bf8410 100644 --- a/common/rfb/JpegCompressor.cxx +++ b/common/rfb/JpegCompressor.cxx @@ -94,7 +94,7 @@ JpegEmptyOutputBuffer(j_compress_ptr cinfo) JPEG_DEST_MGR *dest = (JPEG_DEST_MGR *)cinfo->dest; JpegCompressor *jc = dest->instance; - jc->setptr(dest->pub.next_output_byte); + jc->setptr(jc->getend()); jc->overrun(jc->getend() - jc->getstart(), 1); dest->pub.next_output_byte = jc->getptr(); dest->pub.free_in_buffer = jc->getend() - jc->getptr(); |