summaryrefslogtreecommitdiff
path: root/jdatasrc-tj.c
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2013-01-01 10:17:03 +0000
committerDRC <dcommander@users.sourceforge.net>2013-01-01 10:17:03 +0000
commitb5f2e450acbbae79c792f0ea5b47644fd2290a31 (patch)
tree66aebf107f1f048a44ad7cd07076d8038b36dce8 /jdatasrc-tj.c
parent6d6e37df1830982700720d30196ab9ccf62b26a0 (diff)
parent5829cb23983cd241c48abd8ed70ff3627560c453 (diff)
Minor modifications from jpeg-8d
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@879 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jdatasrc-tj.c')
-rw-r--r--jdatasrc-tj.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/jdatasrc-tj.c b/jdatasrc-tj.c
index e980529..9c8cd9c 100644
--- a/jdatasrc-tj.c
+++ b/jdatasrc-tj.c
@@ -3,7 +3,7 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1996, Thomas G. Lane.
- * Modified 2009-2010 by Guido Vollbeding.
+ * Modified 2009-2011 by Guido Vollbeding.
* Modifications:
* Copyright (C) 2011, D. R. Commander.
* For conditions of distribution and use, see the accompanying README file.
@@ -71,16 +71,17 @@ init_mem_source (j_decompress_ptr cinfo)
METHODDEF(boolean)
fill_mem_input_buffer (j_decompress_ptr cinfo)
{
- static JOCTET mybuffer[4];
+ static const JOCTET mybuffer[4] = {
+ (JOCTET) 0xFF, (JOCTET) JPEG_EOI, 0, 0
+ };
/* The whole JPEG data is expected to reside in the supplied memory
* buffer, so any request for more data beyond the given buffer size
* is treated as an error.
*/
WARNMS(cinfo, JWRN_JPEG_EOF);
+
/* Insert a fake EOI marker */
- mybuffer[0] = (JOCTET) 0xFF;
- mybuffer[1] = (JOCTET) JPEG_EOI;
cinfo->src->next_input_byte = mybuffer;
cinfo->src->bytes_in_buffer = 2;