summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/libjpeg/jdatadst.c
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2017-01-25 17:49:53 +0100
committer hap <happppp@users.noreply.github.com>2017-01-25 17:49:53 +0100
commit78a7342750182687a08060c5e060cb897800e9f6 (patch)
tree73ab5b3a3b09c56a73a74950a71701adf7a22cc7 /3rdparty/libjpeg/jdatadst.c
parent93c92be81517a982ef9b47eed610a3e42ed244bc (diff)
updated libjpeg to 9c (nw)
Diffstat (limited to '3rdparty/libjpeg/jdatadst.c')
-rw-r--r--3rdparty/libjpeg/jdatadst.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/3rdparty/libjpeg/jdatadst.c b/3rdparty/libjpeg/jdatadst.c
index a0ccfb20a66..5c8681c9e4a 100644
--- a/3rdparty/libjpeg/jdatadst.c
+++ b/3rdparty/libjpeg/jdatadst.c
@@ -2,7 +2,7 @@
* jdatadst.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
- * Modified 2009 by Guido Vollbeding.
+ * Modified 2009-2012 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.
*
@@ -128,7 +128,7 @@ empty_mem_output_buffer (j_compress_ptr cinfo)
/* Try to allocate new buffer with double size */
nextsize = dest->bufsize * 2;
- nextbuffer = (JOCTET*)malloc(nextsize);
+ nextbuffer = (JOCTET *) malloc(nextsize);
if (nextbuffer == NULL)
ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
@@ -226,6 +226,9 @@ jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
* larger memory, so the buffer is available to the application after
* finishing compression, and then the application is responsible for
* freeing the requested memory.
+ * Note: An initial buffer supplied by the caller is expected to be
+ * managed by the application. The library does not free such buffer
+ * when allocating a larger buffer.
*/
GLOBAL(void)
@@ -256,7 +259,7 @@ jpeg_mem_dest (j_compress_ptr cinfo,
if (*outbuffer == NULL || *outsize == 0) {
/* Allocate initial buffer */
- dest->newbuffer = *outbuffer = (unsigned char*)malloc(OUTPUT_BUF_SIZE);
+ dest->newbuffer = *outbuffer = (unsigned char *) malloc(OUTPUT_BUF_SIZE);
if (dest->newbuffer == NULL)
ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
*outsize = OUTPUT_BUF_SIZE;