summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-09-30 11:12:05 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-09-30 11:12:05 -0700
commitd53e6fdb0a86ca1ddb12876a60f7f2d7508b5349 (patch)
tree1d1eebf565936adff5d2d5c68741774e8d86f0eb /core/src/fxcodec/codec
parent1b24b697659b9b933f336238665c835497464a0b (diff)
downloadpdfium-d53e6fdb0a86ca1ddb12876a60f7f2d7508b5349.tar.xz
Update openjpeg
BUG=407964, 414182, 413447 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/589243004
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 595d4df652..32adb8e3e4 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -82,7 +82,7 @@ opj_stream_t* fx_opj_stream_create_memory_stream (DecodeData* data, OPJ_SIZE_T p
if (! l_stream) {
return NULL;
}
- opj_stream_set_user_data_v3(l_stream, data, NULL);
+ opj_stream_set_user_data(l_stream, data, NULL);
opj_stream_set_user_data_length(l_stream, data->src_size);
opj_stream_set_read_function(l_stream, opj_read_from_memory);
opj_stream_set_write_function(l_stream, opj_write_from_memory);
@@ -609,11 +609,13 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, int src_size)
image = NULL;
return FALSE;
}
+/*
if(this->m_useColorSpace) {
image->useColorSpace = 1;
} else {
image->useColorSpace = 0;
}
+*/
if (!parameters.nb_tile_to_decode) {
if (!opj_set_decode_area(l_codec, image, parameters.DA_x0,
parameters.DA_y0, parameters.DA_x1, parameters.DA_y1)) {
@@ -643,7 +645,8 @@ FX_BOOL CJPX_Decoder::Init(const unsigned char* src_data, int src_size)
if(image->color_space == OPJ_CLRSPC_SYCC) {
color_sycc_to_rgb(image);
}
- if(image->icc_profile_buf && !image->useColorSpace) {
+ //if(image->icc_profile_buf && !image->useColorSpace) {
+ if(image->icc_profile_buf) {
FX_Free(image->icc_profile_buf);
image->icc_profile_buf = NULL;
image->icc_profile_len = 0;