summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_GsidProc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_GsidProc.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_GsidProc.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/core/fxcodec/jbig2/JBig2_GsidProc.cpp b/core/fxcodec/jbig2/JBig2_GsidProc.cpp
index 30f95b8200..ee6cd368d5 100644
--- a/core/fxcodec/jbig2/JBig2_GsidProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GsidProc.cpp
@@ -46,7 +46,7 @@ uint32_t* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
FXCODEC_STATUS status =
pGRD->Start_decode_Arith(&pImage, pArithDecoder, gbContext, nullptr);
while (status == FXCODEC_STATUS_DECODE_TOBECONTINUE)
- pGRD->Continue_decode(pPause);
+ status = pGRD->Continue_decode(pPause);
if (!pImage)
return nullptr;
@@ -78,11 +78,7 @@ uint32_t* CJBig2_GSIDProc::decode_MMR(CJBig2_BitStream* pStream,
std::unique_ptr<CJBig2_Image*> GSPLANES(FX_Alloc(CJBig2_Image*, GSBPP));
JBIG2_memset(GSPLANES.get(), 0, sizeof(CJBig2_Image*) * GSBPP);
- FXCODEC_STATUS status =
- pGRD->Start_decode_MMR(&GSPLANES.get()[GSBPP - 1], pStream, nullptr);
- while (status == FXCODEC_STATUS_DECODE_TOBECONTINUE) {
- pGRD->Continue_decode(pPause);
- }
+ pGRD->Start_decode_MMR(&GSPLANES.get()[GSBPP - 1], pStream, nullptr);
if (!GSPLANES.get()[GSBPP - 1])
return nullptr;
@@ -90,11 +86,7 @@ uint32_t* CJBig2_GSIDProc::decode_MMR(CJBig2_BitStream* pStream,
pStream->offset(3);
int32_t J = GSBPP - 2;
while (J >= 0) {
- FXCODEC_STATUS status =
- pGRD->Start_decode_MMR(&GSPLANES.get()[J], pStream, nullptr);
- while (status == FXCODEC_STATUS_DECODE_TOBECONTINUE) {
- pGRD->Continue_decode(pPause);
- }
+ pGRD->Start_decode_MMR(&GSPLANES.get()[J], pStream, nullptr);
if (!GSPLANES.get()[J]) {
for (int32_t K = GSBPP - 1; K > J; --K)
delete GSPLANES.get()[K];