summaryrefslogtreecommitdiff
path: root/jpeg/wrrle.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2018-03-27 16:26:13 +0100
committerChris Liddell <chris.liddell@artifex.com>2018-03-29 13:44:03 +0100
commit25971c91d6433b0249d3b721b75ef704afe0a09c (patch)
treef4d198f921ffeaa89ed6c63190db1820401494dc /jpeg/wrrle.c
parentd8a919d4b45097a527f6f39d509b920d285d709b (diff)
downloadghostpdl-25971c91d6433b0249d3b721b75ef704afe0a09c.tar.gz
Update libjpeg to 9c
Plus re-applying: Bug 697186: Workaround JPEG lib bug. 8dcec8cc076a0cf8350ca7a6ec1d3136812e2a24 Bug 697186: Tweak to previous JPEG fix. dc62c90930512f4b571f68c9110022b234cbd411
Diffstat (limited to 'jpeg/wrrle.c')
-rw-r--r--jpeg/wrrle.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/jpeg/wrrle.c b/jpeg/wrrle.c
index a4e73372d..403e2606a 100644
--- a/jpeg/wrrle.c
+++ b/jpeg/wrrle.c
@@ -2,6 +2,7 @@
* wrrle.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
+ * Modified 2017 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -263,8 +264,8 @@ finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
/* Emit file trailer */
rle_puteof(&header);
- fflush(dest->pub.output_file);
- if (ferror(dest->pub.output_file))
+ JFFLUSH(dest->pub.output_file);
+ if (JFERROR(dest->pub.output_file))
ERREXIT(cinfo, JERR_FILE_WRITE);
}
@@ -299,7 +300,7 @@ jinit_write_rle (j_decompress_ptr cinfo)
(JDIMENSION) (cinfo->output_width * cinfo->output_components),
cinfo->output_height, (JDIMENSION) 1);
- return (djpeg_dest_ptr) dest;
+ return &dest->pub;
}
#endif /* RLE_SUPPORTED */