diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2013-02-16 17:39:23 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2013-02-16 17:39:23 +0000 |
| commit | 4bf4a7668eaeaa4b02051afe06b8ec3e0d805de3 (patch) | |
| tree | 1e7b594fe97228ed16eb6268a8f9bf8c3175a06c /src/bin | |
| parent | c03ca9c73c15b893d5e952207224e3e339b5bbd6 (diff) | |
[trunk] move to the new API for function opj_stream_destroy. Use now opj_stream_destroy_v3 (WIP)
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/jp2/opj_compress.c | 10 | ||||
| -rw-r--r-- | src/bin/jp2/opj_decompress.c | 16 | ||||
| -rw-r--r-- | src/bin/jp2/opj_dump.c | 8 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c index 9c957502..5101d841 100644 --- a/src/bin/jp2/opj_compress.c +++ b/src/bin/jp2/opj_compress.c @@ -1806,7 +1806,7 @@ int main(int argc, char **argv) { } default: fprintf(stderr, "skipping file..\n"); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); continue; } @@ -1828,7 +1828,7 @@ int main(int argc, char **argv) { fout = fopen(parameters.outfile, "wb"); if (! fout) { fprintf(stderr, "Not enable to create output file!\n"); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); return 1; } @@ -1852,7 +1852,7 @@ int main(int argc, char **argv) { for (i=0;i<l_nb_tiles;++i) { if (! opj_write_tile(l_codec,i,l_data,l_data_size,l_stream)) { fprintf(stderr, "ERROR -> test_tile_encoder: failed to write the tile %d!\n",i); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); fclose(fout); opj_destroy_codec(l_codec); opj_image_destroy(image); @@ -1873,7 +1873,7 @@ int main(int argc, char **argv) { } if (!bSuccess) { - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); fclose(fout); opj_destroy_codec(l_codec); opj_image_destroy(image); @@ -1883,7 +1883,7 @@ int main(int argc, char **argv) { fprintf(stderr,"Generated outfile %s\n",parameters.outfile); /* close and free the byte stream */ - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); fclose(fout); /* free remaining compression structures */ diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c index df2978db..e462fb5e 100644 --- a/src/bin/jp2/opj_decompress.c +++ b/src/bin/jp2/opj_decompress.c @@ -783,7 +783,7 @@ int main(int argc, char **argv) } default: fprintf(stderr, "skipping file..\n"); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); continue; } @@ -795,7 +795,7 @@ int main(int argc, char **argv) /* Setup the decoder decoding parameters using user parameters */ if ( !opj_setup_decoder(l_codec, ¶meters) ){ 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; @@ -805,7 +805,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 -> opj_decompress: 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); @@ -817,7 +817,7 @@ int main(int argc, char **argv) if (!opj_set_decode_area(l_codec, image, parameters.DA_x0, parameters.DA_y0, parameters.DA_x1, parameters.DA_y1)){ fprintf(stderr, "ERROR -> opj_decompress: failed to set the decoded area\n"); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); opj_destroy_codec(l_codec); opj_image_destroy(image); fclose(fsrc); @@ -828,7 +828,7 @@ int main(int argc, char **argv) if (!(opj_decode(l_codec, l_stream, image) && opj_end_decompress(l_codec, l_stream))) { fprintf(stderr,"ERROR -> opj_decompress: failed to decode image!\n"); opj_destroy_codec(l_codec); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); opj_image_destroy(image); fclose(fsrc); return EXIT_FAILURE; @@ -840,7 +840,7 @@ int main(int argc, char **argv) /*if (!opj_set_decoded_resolution_factor(l_codec, 5)) { fprintf(stderr, "ERROR -> opj_decompress: failed to set the resolution factor tile!\n"); opj_destroy_codec(l_codec); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); opj_image_destroy(image); fclose(fsrc); return EXIT_FAILURE; @@ -849,7 +849,7 @@ int main(int argc, char **argv) if (!opj_get_decoded_tile(l_codec, l_stream, image, parameters.tile_index)) { fprintf(stderr, "ERROR -> opj_decompress: failed to decode tile!\n"); opj_destroy_codec(l_codec); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); opj_image_destroy(image); fclose(fsrc); return EXIT_FAILURE; @@ -858,7 +858,7 @@ int main(int argc, char **argv) } /* Close the byte stream */ - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); fclose(fsrc); if(image->color_space == OPJ_CLRSPC_SYCC){ diff --git a/src/bin/jp2/opj_dump.c b/src/bin/jp2/opj_dump.c index 2bc1893a..0fb5d117 100644 --- a/src/bin/jp2/opj_dump.c +++ b/src/bin/jp2/opj_dump.c @@ -523,7 +523,7 @@ int main(int argc, char *argv[]) } default: fprintf(stderr, "skipping file..\n"); - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); continue; } @@ -535,7 +535,7 @@ int main(int argc, char *argv[]) /* Setup the decoder decoding parameters using user parameters */ if ( !opj_setup_decoder(l_codec, ¶meters) ){ fprintf(stderr, "ERROR -> opj_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); fclose(fout); @@ -545,7 +545,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 -> opj_dump: 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); @@ -560,7 +560,7 @@ int main(int argc, char *argv[]) cstr_index = opj_get_cstr_index(l_codec); /* close the byte stream */ - opj_stream_destroy(l_stream); + opj_stream_destroy_v3(l_stream); fclose(fsrc); /* free remaining structures */ |
