summaryrefslogtreecommitdiff
path: root/tests/j2k_random_tile_access.c
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2013-02-16 17:39:23 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2013-02-16 17:39:23 +0000
commit4bf4a7668eaeaa4b02051afe06b8ec3e0d805de3 (patch)
tree1e7b594fe97228ed16eb6268a8f9bf8c3175a06c /tests/j2k_random_tile_access.c
parentc03ca9c73c15b893d5e952207224e3e339b5bbd6 (diff)
[trunk] move to the new API for function opj_stream_destroy. Use now opj_stream_destroy_v3 (WIP)
Diffstat (limited to 'tests/j2k_random_tile_access.c')
-rw-r--r--tests/j2k_random_tile_access.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/j2k_random_tile_access.c b/tests/j2k_random_tile_access.c
index afe4bd41..065a955c 100644
--- a/tests/j2k_random_tile_access.c
+++ b/tests/j2k_random_tile_access.c
@@ -228,7 +228,7 @@ int main(int argc, char **argv)
/* Setup the decoder decoding parameters using user parameters */
if ( !opj_setup_decoder(l_codec, &parameters) ){
fprintf(stderr, "ERROR -> j2k_dump: failed to setup the decoder\n");
- opj_stream_destroy(l_stream);
+ opj_stream_destroy_v3(l_stream);
fclose(fsrc);
opj_destroy_codec(l_codec);
return EXIT_FAILURE;
@@ -237,7 +237,7 @@ int main(int argc, char **argv)
/* Read the main header of the codestream and if necessary the JP2 boxes*/
if(! opj_read_header(l_stream, l_codec, &image)){
fprintf(stderr, "ERROR -> j2k_to_image: failed to read the header\n");
- opj_stream_destroy(l_stream);
+ opj_stream_destroy_v3(l_stream);
fclose(fsrc);
opj_destroy_codec(l_codec);
opj_image_destroy(image);
@@ -258,7 +258,7 @@ int main(int argc, char **argv)
fprintf(stdout, "Decoding tile %d ...\n", tile_index); \
if(!opj_get_decoded_tile(l_codec, l_stream, image, tile_index )){ \
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode tile %d\n", tile_index); \
- opj_stream_destroy(l_stream); \
+ opj_stream_destroy_v3(l_stream); \
opj_destroy_cstr_info(&cstr_info); \
opj_destroy_codec(l_codec); \
opj_image_destroy(image); \
@@ -268,7 +268,7 @@ int main(int argc, char **argv)
for(index = 0; index < image->numcomps; ++index) { \
if( image->comps[index].data == NULL ){ \
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode tile %d\n", tile_index); \
- opj_stream_destroy(l_stream); \
+ opj_stream_destroy_v3(l_stream); \
opj_destroy_cstr_info(&cstr_info); \
opj_destroy_codec(l_codec); \
opj_image_destroy(image); \
@@ -286,7 +286,7 @@ int main(int argc, char **argv)
TEST_TILE(tile_lr)
/* Close the byte stream */
- opj_stream_destroy(l_stream);
+ opj_stream_destroy_v3(l_stream);
/* Destroy code stream info */
opj_destroy_cstr_info(&cstr_info);