aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2020-05-19 21:24:58 +0200
committerPierre Ossman <ossman@cendio.se>2020-05-21 11:34:22 +0200
commit0cd533cf7f53daa157a9b7f6af2b9b72eeca5403 (patch)
tree5518f50f087b22ce47d572dc574b525e33572457
parent186819080baea53410ae8d8100179a3874ac1e32 (diff)
downloadtigervnc-0cd533cf7f53daa157a9b7f6af2b9b72eeca5403.tar.gz
tigervnc-0cd533cf7f53daa157a9b7f6af2b9b72eeca5403.zip
Remove special functions from JPEG compressor
We can do what we want with the standard methods.
-rw-r--r--common/rfb/JpegCompressor.cxx2
-rw-r--r--common/rfb/JpegCompressor.h6
2 files changed, 1 insertions, 7 deletions
diff --git a/common/rfb/JpegCompressor.cxx b/common/rfb/JpegCompressor.cxx
index 4cb35a47..5cc3855d 100644
--- a/common/rfb/JpegCompressor.cxx
+++ b/common/rfb/JpegCompressor.cxx
@@ -95,7 +95,7 @@ JpegEmptyOutputBuffer(j_compress_ptr cinfo)
JpegCompressor *jc = dest->instance;
jc->setptr(jc->getend());
- jc->overrun(jc->getend() - jc->getstart());
+ jc->check(jc->length());
dest->pub.next_output_byte = jc->getptr();
dest->pub.free_in_buffer = jc->avail();
diff --git a/common/rfb/JpegCompressor.h b/common/rfb/JpegCompressor.h
index ab0f9f85..de201732 100644
--- a/common/rfb/JpegCompressor.h
+++ b/common/rfb/JpegCompressor.h
@@ -47,12 +47,6 @@ namespace rfb {
void writeBytes(const void*, int);
- inline rdr::U8* getstart() { return start; }
-
- inline virtual void overrun(int needed) {
- return MemOutStream::overrun(needed);
- }
-
private:
struct jpeg_compress_struct *cinfo;