From 66d4056528861ccff300e968a82e5c966963d89f Mon Sep 17 00:00:00 2001
From: cristy <urban-warrior@git.imagemagick.org>
Date: Fri, 3 Jan 2014 01:27:44 +0000
Subject: [PATCH]

---
 coders/jp2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coders/jp2.c b/coders/jp2.c
index ae618ef02..7fe539620 100644
--- a/coders/jp2.c
+++ b/coders/jp2.c
@@ -360,7 +360,7 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception)
       opj_destroy_codec(jp2_codec);
       ThrowReaderException(DelegateError,"UnableToManageJP2Stream");
     }
-  jp2_stream=opj_stream_create(1024,1);
+  jp2_stream=opj_stream_create(OPJ_J2K_STREAM_CHUNK_SIZE,1);
   opj_stream_set_read_function(jp2_stream,JP2ReadHandler);
   opj_stream_set_write_function(jp2_stream,JP2WriteHandler);
   opj_stream_set_seek_function(jp2_stream,JP2SeekHandler);
-- 
2.40.0