summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/fx_codec_jbig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/codec/fx_codec_jbig.cpp')
-rw-r--r--core/fxcodec/codec/fx_codec_jbig.cpp14
1 files changed, 7 insertions, 7 deletions
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;