int main(int argc, char **argv)
{
opj_decompress_parameters parameters; /* decompression parameters */
- opj_image_t* image = NULL;
- opj_stream_t *l_stream = NULL; /* Stream */
- opj_codec_t* l_codec = NULL; /* Handle to a decompressor */
- opj_codestream_index_t* cstr_index = NULL;
OPJ_INT32 num_images, imageno;
img_fol_t img_fol;
/*Decoding image one by one*/
for (imageno = 0; imageno < num_images ; imageno++) {
+ opj_image_t* image = NULL;
+ opj_stream_t *l_stream = NULL; /* Stream */
+ opj_codec_t* l_codec = NULL; /* Handle to a decompressor */
+ opj_codestream_index_t* cstr_index = NULL;
if (!parameters.quiet) {
fprintf(stderr, "\n");
}
}
- /* FIXME? Shouldn't that situation be considered as an error of */
- /* opj_decode() / opj_get_decoded_tile() ? */
- if (image->comps[0].data == NULL) {
- fprintf(stderr, "ERROR -> opj_decompress: no image data!\n");
- opj_destroy_codec(l_codec);
- opj_stream_destroy(l_stream);
- opj_image_destroy(image);
- failed = 1;
- goto fin;
- }
-
tCumulative += opj_clock() - t;
numDecompressedImages++;