projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87c0d7d
)
Add comment explaining bj is not use when l_data_size == 0
690/head
author
Even Rouault
<even.rouault@spatialys.com>
Sat, 9 Jan 2016 13:30:48 +0000
(14:30 +0100)
committer
Even Rouault
<even.rouault@spatialys.com>
Sat, 9 Jan 2016 13:30:48 +0000
(14:30 +0100)
src/lib/openjp2/dwt.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/dwt.c
b/src/lib/openjp2/dwt.c
index 43498bdc8f5e432229ae9537875b93434d814c5c..a4ff01ba8f9883f06fd99f00300a39c5a63fd1a0 100644
(file)
--- a/
src/lib/openjp2/dwt.c
+++ b/
src/lib/openjp2/dwt.c
@@
-409,6
+409,8
@@
static INLINE OPJ_BOOL opj_dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void
l_data_size = opj_dwt_max_resolution( tilec->resolutions,tilec->numresolutions) * (OPJ_UINT32)sizeof(OPJ_INT32);
bj = (OPJ_INT32*)opj_malloc((size_t)l_data_size);
+ /* l_data_size is equal to 0 when numresolutions == 1 but bj is not used */
+ /* in that case, so do not error out */
if (l_data_size != 0 && ! bj) {
return OPJ_FALSE;
}