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

Issue 990683002: Fix a bug that JPX images can't be shown (Closed)

Created:
5 years, 9 months ago by jun_fang
Modified:
5 years, 9 months ago
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix a bug that JPX images can't be shown In the process of opj_end_decompress, it will return fail when the end of coding stream is reached. However it returns true in the same scenario implemented in openJPEG. So the final solution is from openJPEG. Return true when the end of coding stream is reached. BUG=452671 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/cd3c4764b87323ec7b712e537d18292d849611b9

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -3 lines) Patch
M core/src/fxcodec/codec/fx_codec_jpx_opj.cpp View 1 2 3 chunks +10 lines, -3 lines 4 comments Download

Messages

Total messages: 18 (1 generated)
jun_fang
Hi Tom, Please start to review this change.
5 years, 9 months ago (2015-03-08 01:54:09 UTC) #2
jun_fang
On 2015/03/08 01:54:09, jun_fang wrote: > Hi Tom, > > Please start to review this ...
5 years, 9 months ago (2015-03-09 00:02:06 UTC) #3
jun_fang
On 2015/03/09 00:02:06, jun_fang wrote: > On 2015/03/08 01:54:09, jun_fang wrote: > > Hi Tom, ...
5 years, 9 months ago (2015-03-10 22:40:39 UTC) #4
jun_fang
On 2015/03/10 22:40:39, jun_fang wrote: > On 2015/03/09 00:02:06, jun_fang wrote: > > On 2015/03/08 ...
5 years, 9 months ago (2015-03-10 22:43:31 UTC) #5
Tom Sepez
Makes sense. Posix fseek() says that fseeking beyond EOF is ok: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html
5 years, 9 months ago (2015-03-11 18:15:23 UTC) #6
Tom Sepez
https://codereview.chromium.org/990683002/diff/20001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/990683002/diff/20001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode59 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:59: return p_nb_bytes; I think we have to adjust the ...
5 years, 9 months ago (2015-03-11 18:25:41 UTC) #7
Tom Sepez
https://codereview.chromium.org/990683002/diff/20001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/990683002/diff/20001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode43 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:43: if (srcData == NULL || srcData->src_size == 0 || ...
5 years, 9 months ago (2015-03-11 18:29:13 UTC) #8
Tom Sepez
This is also the kind of thing that is well-suited for unit tests. If I ...
5 years, 9 months ago (2015-03-11 19:00:13 UTC) #9
jun_fang
https://codereview.chromium.org/990683002/diff/20001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/990683002/diff/20001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode43 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:43: if (srcData == NULL || srcData->src_size == 0 || ...
5 years, 9 months ago (2015-03-11 21:14:42 UTC) #10
jun_fang
On 2015/03/11 21:14:42, jun_fang wrote: > https://codereview.chromium.org/990683002/diff/20001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp > File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): > > https://codereview.chromium.org/990683002/diff/20001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode43 > ...
5 years, 9 months ago (2015-03-13 00:15:44 UTC) #11
Tom Sepez
> Hi Tom, > > Does it look good to you? Code looks good, but ...
5 years, 9 months ago (2015-03-16 17:16:09 UTC) #12
Tom Sepez
https://codereview.chromium.org/990683002/diff/40001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp File core/src/fxcodec/codec/fx_codec_jpx_opj.cpp (right): https://codereview.chromium.org/990683002/diff/40001/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp#newcode598 core/src/fxcodec/codec/fx_codec_jpx_opj.cpp:598: l_stream = fx_opj_stream_create_memory_stream(&srcData, OPJ_J2K_STREAM_CHUNK_SIZE, 1); Doesn't srcData go out ...
5 years, 9 months ago (2015-03-16 17:24:52 UTC) #13
Tom Sepez
If I were making a unit test, I'd call it fx_codec_jpx_unittest.cpp, and it would live ...
5 years, 9 months ago (2015-03-16 17:51:21 UTC) #14
Tom Sepez
lgtm
5 years, 9 months ago (2015-03-16 17:51:28 UTC) #15
Tom Sepez
On 2015/03/16 17:51:28, Tom Sepez wrote: > lgtm Argh, premature LGTM. No matter, If you ...
5 years, 9 months ago (2015-03-16 17:58:12 UTC) #16
jun_fang
On 2015/03/16 17:58:12, Tom Sepez wrote: > On 2015/03/16 17:51:28, Tom Sepez wrote: > > ...
5 years, 9 months ago (2015-03-16 18:11:21 UTC) #17
jun_fang
5 years, 9 months ago (2015-03-16 18:23:02 UTC) #18
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
cd3c4764b87323ec7b712e537d18292d849611b9 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698