From d53e6fdb0a86ca1ddb12876a60f7f2d7508b5349 Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Tue, 30 Sep 2014 11:12:05 -0700 Subject: Update openjpeg BUG=407964, 414182, 413447 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/589243004 --- core/src/fxcodec/codec/fx_codec_jpx_opj.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/src/fxcodec/codec') 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; -- cgit v1.2.3