diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-09-19 17:48:07 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-09-19 17:48:07 +0200 |
| commit | e17bbde9066600528ab523adee69d9c9c33ba157 (patch) | |
| tree | c17e7c492b84be15649e33b0dfe8b746371c67fb /src/lib/openjp2/openjpeg.c | |
| parent | 7e2b6bebff12eab8bdc17fc9af017e8c11652f4f (diff) | |
opj_set_decoded_components(): add a provision for a apply_color_transforms parameter in case we support it in the future
Diffstat (limited to 'src/lib/openjp2/openjpeg.c')
| -rw-r--r-- | src/lib/openjp2/openjpeg.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/openjp2/openjpeg.c b/src/lib/openjp2/openjpeg.c index 5ba205e1..7b123034 100644 --- a/src/lib/openjp2/openjpeg.c +++ b/src/lib/openjp2/openjpeg.c @@ -441,12 +441,21 @@ OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream, OPJ_BOOL OPJ_CALLCONV opj_set_decoded_components(opj_codec_t *p_codec, OPJ_UINT32 numcomps, - const OPJ_UINT32* comps_indices) + const OPJ_UINT32* comps_indices, + OPJ_BOOL apply_color_transforms) { if (p_codec) { opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; if (! l_codec->is_decompressor) { + opj_event_msg(&(l_codec->m_event_mgr), EVT_ERROR, + "Codec provided to the opj_set_decoded_components function is not a decompressor handler.\n"); + return OPJ_FALSE; + } + + if (apply_color_transforms) { + opj_event_msg(&(l_codec->m_event_mgr), EVT_ERROR, + "apply_color_transforms = OPJ_TRUE is not supported.\n"); return OPJ_FALSE; } |
