summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_HtrdProc.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_HtrdProc.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
index 8618236264..fb2257e853 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp
@@ -64,11 +64,15 @@ std::unique_ptr<CJBig2_Image> CJBig2_HTRDProc::DecodeArith(
std::vector<std::unique_ptr<CJBig2_Image>> GSPLANES(GSBPP);
for (int32_t i = GSBPP - 1; i >= 0; --i) {
std::unique_ptr<CJBig2_Image> pImage;
- FXCODEC_STATUS status =
- GRD.StartDecodeArith(&pImage, pArithDecoder, gbContext, nullptr);
+ CJBig2_GRDProc::ProgressiveArithDecodeState state;
+ state.pImage = &pImage;
+ state.pArithDecoder = pArithDecoder;
+ state.gbContext = gbContext;
+ state.pPause = nullptr;
+ FXCODEC_STATUS status = GRD.StartDecodeArith(&state);
+ state.pPause = pPause;
while (status == FXCODEC_STATUS_DECODE_TOBECONTINUE)
- status = GRD.ContinueDecode(pPause, pArithDecoder);
-
+ status = GRD.ContinueDecode(&state);
if (!pImage)
return nullptr;