From: Pierre Ossman Date: Tue, 19 May 2020 19:24:58 +0000 (+0200) Subject: Remove special functions from JPEG compressor X-Git-Tag: v1.11.90~74^2~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0cd533cf7f53daa157a9b7f6af2b9b72eeca5403;p=tigervnc.git Remove special functions from JPEG compressor We can do what we want with the standard methods. --- 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;