}
opj_dinfo_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format) {
- opj_dinfo_t *dinfo = (opj_dinfo_t*)opj_malloc(sizeof(opj_dinfo_t));
+ opj_dinfo_t *dinfo = (opj_dinfo_t*)opj_calloc(1, sizeof(opj_dinfo_t));
if(!dinfo) return NULL;
dinfo->is_decompressor = true;
switch(format) {
}
opj_cinfo_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format) {
- opj_cinfo_t *cinfo = (opj_cinfo_t*)opj_malloc(sizeof(opj_cinfo_t));
+ opj_cinfo_t *cinfo = (opj_cinfo_t*)opj_calloc(1, sizeof(opj_cinfo_t));
if(!cinfo) return NULL;
cinfo->is_decompressor = false;
switch(format) {
parameters->tp_on = 0;
parameters->decod_format = -1;
parameters->cod_format = -1;
+ parameters->tcp_rates[0] = 0;
+ parameters->tcp_numlayers = 0;
+ parameters->cp_disto_alloc = 0;
+ parameters->cp_fixed_alloc = 0;
+ parameters->cp_fixed_quality = 0;
+
/* UniPG>> */
#ifdef USE_JPWL
parameters->jpwl_epc_on = false;
opj_free(tile_info->tp);
}
opj_free(cstr_info->tile);
+ opj_free(cstr_info->marker);
+ opj_free(cstr_info->numdecompos);
}
}