Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2376)

Unified Diff: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp

Issue 589243004: Update openjpeg (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Update to openjpeg r2891 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/CMakeLists.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 595d4df652b4f30ab7c86f3fb94962b066d9bf79..32adb8e3e4d0864d0f04d034c96569e32fe265d0 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;
« no previous file with comments | « no previous file | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698