From ba923a852943792f5109e2c8c5a480ad9ec860db Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 24 Sep 2013 03:26:47 +0000 Subject: [PATCH] Fix I/O suspension. This little nugget of code was introduced in r30 as part of an early attempt to make buffered I/O work with the optimized Huffman codec. Ultimately, r32 reverted a lot of that mess and introduced much of the logic we now use, rendering this code unnecessary, but it was never reverted because it only causes problems when I/O suspension is used, and apparently no one has tried to do that with libjpeg-turbo until now. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1033 632fc199-4ca6-4c93-a231-07263d6284db --- ChangeLog.txt | 3 +++ jchuff.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 12a0b54..468f090 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -12,6 +12,9 @@ Ubuntu 11 and later) without setting the linker path. multiple "Mismatch in operand sizes" errors when attempting to build the x86 SIMD code with NASM 0.98. +[4] Fixed a Huffman encoder bug that prevented I/O suspension from working +properly. + 1.2.1 ===== diff --git a/jchuff.c b/jchuff.c index 33da002..887614d 100644 --- a/jchuff.c +++ b/jchuff.c @@ -299,8 +299,6 @@ dump_buffer (working_state * state) { struct jpeg_destination_mgr * dest = state->cinfo->dest; - dest->free_in_buffer = state->free_in_buffer; - if (! (*dest->empty_output_buffer) (state->cinfo)) return FALSE; /* After a successful buffer dump, must reset buffer pointers */ -- 2.49.0