summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c')
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c
index 60698e3ffe..bea4574257 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c
@@ -571,6 +571,7 @@ OPJ_BOOL opj_dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres, DWT1D
h.mem = (OPJ_INT32*)
opj_aligned_malloc(opj_dwt_max_resolution(tr, numres) * sizeof(OPJ_INT32));
if (! h.mem){
+ /* FIXME event manager error callback */
return OPJ_FALSE;
}
@@ -808,7 +809,6 @@ void opj_v4dwt_decode(opj_v4dwt_t* restrict dwt)
a = 1;
b = 0;
}
-
#ifdef __SSE__
opj_v4dwt_decode_step1_sse(dwt->wavelet+a, dwt->sn, _mm_set1_ps(opj_K));
opj_v4dwt_decode_step1_sse(dwt->wavelet+b, dwt->dn, _mm_set1_ps(opj_c13318));
@@ -843,6 +843,10 @@ OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numr
OPJ_UINT32 w = (OPJ_UINT32)(tilec->x1 - tilec->x0);
h.wavelet = (opj_v4_t*) opj_aligned_malloc((opj_dwt_max_resolution(res, numres)+5) * sizeof(opj_v4_t));
+ if (!h.wavelet) {
+ /* FIXME event manager error callback */
+ return OPJ_FALSE;
+ }
v.wavelet = h.wavelet;
while( --numres) {