]> source.dussan.org Git - tigervnc.git/commitdiff
Remove special functions from JPEG compressor
authorPierre Ossman <ossman@cendio.se>
Tue, 19 May 2020 19:24:58 +0000 (21:24 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 21 May 2020 09:34:22 +0000 (11:34 +0200)
We can do what we want with the standard methods.

common/rfb/JpegCompressor.cxx
common/rfb/JpegCompressor.h

index 4cb35a47d64b7eb2eb32457a1703f7e2e54d297f..5cc3855d08580e379a944621ee35c786f9f2dee4 100644 (file)
@@ -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();
 
index ab0f9f8533502d43e729b7d63b81410e699092dd..de20173273e75460b8865da6c14244c791d448a0 100644 (file)
@@ -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;