diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2012-11-08 16:41:01 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2012-11-08 16:41:01 +0000 |
| commit | 8f58b776b0519b8ce3527ceb5a3bf00d3bf0df93 (patch) | |
| tree | 7d6d1f924c8bd3d75945743ffbcad05baaeb2cda /tests/j2k_random_tile_access.c | |
| parent | fb0a11636f6a6e0ee61a75ea2052309c399cf86b (diff) | |
[trunk] Add more test in j2k_random_tile_access
Update issue 186
Diffstat (limited to 'tests/j2k_random_tile_access.c')
| -rw-r--r-- | tests/j2k_random_tile_access.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/j2k_random_tile_access.c b/tests/j2k_random_tile_access.c index 6fb7e26a..add16a31 100644 --- a/tests/j2k_random_tile_access.c +++ b/tests/j2k_random_tile_access.c @@ -104,7 +104,7 @@ static int infile_format(const char *fname) const char *s, *magic_s; int ext_format, magic_format; unsigned char buf[12]; - unsigned int l_nb_read; + OPJ_SIZE_T l_nb_read; reader = fopen(fname, "rb"); @@ -157,6 +157,7 @@ int main(int argc, char **argv) { FILE *fsrc = NULL; + OPJ_UINT32 index; opj_dparameters_t parameters; /* decompression parameters */ opj_image_t* image = NULL; opj_stream_t *l_stream = NULL; /* Stream */ @@ -269,6 +270,10 @@ int main(int argc, char **argv) fclose(fsrc); \ return EXIT_FAILURE; \ } \ + for(index = 0; index < image->numcomps; ++index) { \ + if( image->comps[index].data == NULL ) \ + return EXIT_FAILURE; \ + } \ fprintf(stdout, "Tile %d is decoded successfully\n", tile_index); TEST_TILE(tile_ul) |
