[1.5] enhance some new JPIP files with opj_config inclusion and using of opj_free/opj_calloc functions (credit to Julien Malik)

This commit is contained in:
Mickael Savinaud
2011-10-06 09:36:22 +00:00
parent 40b4ecfaec
commit 73106fe839
7 changed files with 15 additions and 20 deletions

View File

@@ -31,9 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "cidx_manager.h"
#include "indexbox_manager.h"
#include "cio.h"
#include "opj_includes.h"
/*
@@ -76,7 +74,7 @@ int write_cidx( int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_i
int num_box = 0;
opj_bool EPHused;
box = (opj_jp2_box_t *)calloc( 32, sizeof(opj_jp2_box_t));
box = (opj_jp2_box_t *)opj_calloc( 32, sizeof(opj_jp2_box_t));
for (i=0;i<2;i++){
@@ -120,7 +118,7 @@ int write_cidx( int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_i
cio_seek( cio, lenp+len);
}
free( box);
opj_free( box);
return len;
}