summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/jp2.c
diff options
context:
space:
mode:
authorRobert Gabriel Jakabosky <rjakabosky+github@neoawareness.com>2022-02-10 21:27:17 +0800
committerGitHub <noreply@github.com>2022-02-10 14:27:17 +0100
commit883c31dbe09771aab043744ac2b490d7386878e3 (patch)
tree254f62d7e8158b28eea45e6ff6a58b212a380371 /src/lib/openjp2/jp2.c
parent99d555c0f1818277645a0c79a5199f2e827d68cc (diff)
Add support for partial bitstream decoding (#1407) (fixes #715)
Add a -allow-partial option to opj_decompress utility and a opj_decoder_set_strict_mode() option to the API Co-authored-by: Chris Hafey <chafey@gmail.com>
Diffstat (limited to 'src/lib/openjp2/jp2.c')
-rw-r--r--src/lib/openjp2/jp2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/openjp2/jp2.c b/src/lib/openjp2/jp2.c
index 449440b8..17572195 100644
--- a/src/lib/openjp2/jp2.c
+++ b/src/lib/openjp2/jp2.c
@@ -1901,6 +1901,11 @@ void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters)
OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
}
+void opj_jp2_decoder_set_strict_mode(opj_jp2_t *jp2, OPJ_BOOL strict)
+{
+ opj_j2k_decoder_set_strict_mode(jp2->j2k, strict);
+}
+
OPJ_BOOL opj_jp2_set_threads(opj_jp2_t *jp2, OPJ_UINT32 num_threads)
{
return opj_j2k_set_threads(jp2->j2k, num_threads);