summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-10-31 20:22:11 +0100
committerSebastian Rasmussen <sebras@gmail.com>2019-02-21 16:48:02 +0800
commitb2751967ecabf8d8856e85ab91e25d4f235e2eb3 (patch)
treeb9c812dd14bb3f5347f9525d5a2252ae558ba15a /src/bin
parent51f097e6d5754ddae93e716276fe8176b44ec548 (diff)
openjp2/j2k: Report error if all wanted components are not decoded.
Previously the caller had to check whether each component data had been decoded. This means duplicating the checking in every user of openjpeg which is unnecessary. If the caller wantes to decode all or a set of, or a specific component then openjpeg ought to error out if it was unable to do so. Fixes #1158.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/jp2/opj_decompress.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c
index 4b9583b7..7eeb0952 100644
--- a/src/bin/jp2/opj_decompress.c
+++ b/src/bin/jp2/opj_decompress.c
@@ -1571,17 +1571,6 @@ int main(int argc, char **argv)
}
}
- /* 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++;