projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c1fc05
)
opj_jp2_apply_pclr() also needs to use opj_image_data_alloc/opj_image_data_free
author
Even Rouault
<even.rouault@spatialys.com>
Thu, 6 Jul 2017 00:17:26 +0000
(
02:17
+0200)
committer
Even Rouault
<even.rouault@spatialys.com>
Mon, 7 Aug 2017 16:32:52 +0000
(18:32 +0200)
src/lib/openjp2/jp2.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/jp2.c
b/src/lib/openjp2/jp2.c
index 1211ab5de737762431c3483e776ed68b772b6cc8..33a10d301d7d0ed7aa896f543f6e7935521c59c8 100644
(file)
--- a/
src/lib/openjp2/jp2.c
+++ b/
src/lib/openjp2/jp2.c
@@
-1065,7
+1065,7
@@
static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image,
/* Palette mapping: */
new_comps[i].data = (OPJ_INT32*)
- opj_
m
alloc(old_comps[cmp].w * old_comps[cmp].h * sizeof(OPJ_INT32));
+ opj_
image_data_
alloc(old_comps[cmp].w * old_comps[cmp].h * sizeof(OPJ_INT32));
if (!new_comps[i].data) {
while (i > 0) {
-- i;
@@
-1119,7
+1119,7
@@
static OPJ_BOOL opj_jp2_apply_pclr(opj_image_t *image,
max = image->numcomps;
for (i = 0; i < max; ++i) {
if (old_comps[i].data) {
- opj_free(old_comps[i].data);
+ opj_
image_data_
free(old_comps[i].data);
}
}