summaryrefslogtreecommitdiff
path: root/libopenjpeg/cio.c
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-09-07 15:01:55 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-09-07 15:01:55 +0000
commit3816e0edf40b766ab78cdbf3ba5634b684630d0f (patch)
treeaf0ef564292e21011947790793b59f79a16940d3 /libopenjpeg/cio.c
parente7149e0c567d38e61b69db44ecda7f228310291d (diff)
Indexes can now be generated when decoding J2K codestreams.
Diffstat (limited to 'libopenjpeg/cio.c')
-rw-r--r--libopenjpeg/cio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopenjpeg/cio.c b/libopenjpeg/cio.c
index 0725b381..2ac262a1 100644
--- a/libopenjpeg/cio.c
+++ b/libopenjpeg/cio.c
@@ -58,9 +58,10 @@ opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer
opj_free(cio);
return NULL;
}
- cio->length = (int) (0.1625 * cp->img_size + 2000); /* 0.1625 = 1.3/8 and 2000 bytes as a minimum for headers */
+ cio->length = (unsigned int) (0.1625 * cp->img_size + 2000); /* 0.1625 = 1.3/8 and 2000 bytes as a minimum for headers */
cio->buffer = (unsigned char *)opj_malloc(cio->length);
if(!cio->buffer) {
+ opj_event_msg(cio->cinfo, EVT_ERROR, "Error allocating memory for compressed bitstream\n");
opj_free(cio);
return NULL;
}