diff options
| author | Antonin Descampe <antonin@gmail.com> | 2007-07-08 16:38:51 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2007-07-08 16:38:51 +0000 |
| commit | bdb18ab19c5f0770c32304f13c8af7b46748a8d9 (patch) | |
| tree | 6803dea28a7fab83225d6be07bf90e1f1dfc80de | |
| parent | 167fb6337b005fd16e6015b695ec01421f8182e5 (diff) | |
fixed the size of the memory allocation in cio.c (confusion between bits and bytes)
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | libopenjpeg/cio.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -5,6 +5,9 @@ What's New for OpenJPEG ! : changed + : added +July 8, 2007 +* [ANTONIN] fixed the size of the memory allocation in cio.c (confusion between bits and bytes) + June 21, 2007 * [FOD] Output image color space set when decoding a JP2 file in jp2.c + [GB] Previous, home, and next frame buttons for exploring MJ2 files in OPJViewer diff --git a/libopenjpeg/cio.c b/libopenjpeg/cio.c index 6082e9be..cb0c3e4a 100644 --- a/libopenjpeg/cio.c +++ b/libopenjpeg/cio.c @@ -58,7 +58,7 @@ opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer opj_free(cio); return NULL; } - cio->length = (int) (1.3 * cp->img_size); + cio->length = (int) (0.1625 * cp->img_size); /* 0.1625 = 1.3/8 */ cio->buffer = (unsigned char *)opj_malloc(cio->length); if(!cio->buffer) { opj_free(cio); |
