]> granicus.if.org Git - libjpeg-turbo/commitdiff
Subtle point, but dest->outbuffer is a pointer to the address of the JPEG buffer...
authorDRC <dcommander@users.sourceforge.net>
Thu, 21 Aug 2014 22:15:19 +0000 (22:15 +0000)
committerDRC <dcommander@users.sourceforge.net>
Thu, 21 Aug 2014 22:15:19 +0000 (22:15 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1369 632fc199-4ca6-4c93-a231-07263d6284db

jdatadst-tj.c

index 8289d3a48185a656406b11601098ab2ba1f6ce79..a0e0f2e068ccfb9e1db547e4548e873a4d11289e 100644 (file)
@@ -165,15 +165,14 @@ jpeg_mem_dest_tj (j_compress_ptr cinfo,
                                   sizeof(my_mem_destination_mgr));
     dest = (my_mem_dest_ptr) cinfo->dest;
     dest->newbuffer = NULL;
-    dest->outbuffer = NULL;
+    dest->buffer = NULL;
   }
 
   dest = (my_mem_dest_ptr) cinfo->dest;
   dest->pub.init_destination = init_mem_destination;
   dest->pub.empty_output_buffer = empty_mem_output_buffer;
   dest->pub.term_destination = term_mem_destination;
-  if (dest->outbuffer && *(dest->outbuffer) == *outbuffer &&
-      *outbuffer != NULL && alloc)
+  if (dest->buffer == *outbuffer && *outbuffer != NULL && alloc) {
     reused = TRUE;
   dest->outbuffer = outbuffer;
   dest->outsize = outsize;