diff options
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r-- | core/fxcodec/codec/ccodec_jbig2module.h | 3 | ||||
-rw-r--r-- | core/fxcodec/codec/fx_codec_jbig.cpp | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h index 306b079846..534c0a3ab6 100644 --- a/core/fxcodec/codec/ccodec_jbig2module.h +++ b/core/fxcodec/codec/ccodec_jbig2module.h @@ -51,7 +51,8 @@ class CCodec_Jbig2Module { PauseIndicatorIface* pPause); private: - FXCODEC_STATUS Decode(CCodec_Jbig2Context* pJbig2Context, int result); + FXCODEC_STATUS Decode(CCodec_Jbig2Context* pJbig2Context, + bool decode_success); }; #endif // CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index d8d112bab0..36d6a0609e 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -64,26 +64,26 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode( pJbig2Context->m_pContext = pdfium::MakeUnique<CJBig2_Context>( global_stream, src_stream, pJBig2DocumentContext->GetSymbolDictCache(), false); - int ret = pJbig2Context->m_pContext->GetFirstPage(dest_buf, width, height, - dest_pitch, pPause); - return Decode(pJbig2Context, ret); + bool succeeded = pJbig2Context->m_pContext->GetFirstPage( + dest_buf, width, height, dest_pitch, pPause); + return Decode(pJbig2Context, succeeded); } FXCODEC_STATUS CCodec_Jbig2Module::ContinueDecode( CCodec_Jbig2Context* pJbig2Context, PauseIndicatorIface* pPause) { - int ret = pJbig2Context->m_pContext->Continue(pPause); - return Decode(pJbig2Context, ret); + bool succeeded = pJbig2Context->m_pContext->Continue(pPause); + return Decode(pJbig2Context, succeeded); } FXCODEC_STATUS CCodec_Jbig2Module::Decode(CCodec_Jbig2Context* pJbig2Context, - int result) { + bool decode_success) { FXCODEC_STATUS status = pJbig2Context->m_pContext->GetProcessingStatus(); if (status != FXCODEC_STATUS_DECODE_FINISH) return status; pJbig2Context->m_pContext.reset(); - if (result != JBIG2_SUCCESS) + if (!decode_success) return FXCODEC_STATUS_ERROR; int dword_size = pJbig2Context->m_height * pJbig2Context->m_dest_pitch / 4; |