diff options
author | Sebastian Rasmussen <sebras@hotmail.com> | 2010-07-23 00:07:08 +0000 |
---|---|---|
committer | Sebastian Rasmussen <sebras@hotmail.com> | 2010-07-23 00:07:08 +0000 |
commit | 34e4cba4d49cdb6ac3b5d3a9b8ba1d3d25314d6c (patch) | |
tree | 96b21374bb2cd88cb4c0a7ec81e1ee09129e0a8e | |
parent | a7e4226b65fc3b8bc4742b1c159f048d72dfcfeb (diff) | |
download | mupdf-34e4cba4d49cdb6ac3b5d3a9b8ba1d3d25314d6c.tar.xz |
Have zlib always flush as much output as possible when decoding.
-rw-r--r-- | fitz/filt_flate.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fitz/filt_flate.c b/fitz/filt_flate.c index 48059b86..7abf4292 100644 --- a/fitz/filt_flate.c +++ b/fitz/filt_flate.c @@ -89,11 +89,7 @@ fz_processflated(fz_filter *f, fz_buffer *in, fz_buffer *out) zp->next_out = out->wp; zp->avail_out = out->ep - out->wp; - err = inflate(zp, Z_NO_FLUSH); - - /* Make sure we call it with Z_FINISH at the end of input */ - if (err == Z_OK && in->eof && zp->avail_in == 0 && zp->avail_out > 0) - err = inflate(zp, Z_FINISH); + err = inflate(zp, Z_SYNC_FLUSH); in->rp = in->wp - zp->avail_in; out->wp = out->ep - zp->avail_out; |