diff options
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index 7847bea982..a34e67ae9d 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -1985,15 +1985,16 @@ RetainPtr<CFX_DIBitmap> XFA_LoadImageFromBuffer( pProgressiveDecoder->GetHeight(), dibFormat); pBitmap->Clear(0xffffffff); - int32_t nFrames; - if (pProgressiveDecoder->GetFrames(&nFrames) != FXCODEC_STATUS_DECODE_READY || - nFrames <= 0) { + size_t nFrames; + FXCODEC_STATUS status; + std::tie(status, nFrames) = pProgressiveDecoder->GetFrames(); + if (status != FXCODEC_STATUS_DECODE_READY || nFrames == 0) { pBitmap = nullptr; return pBitmap; } - FXCODEC_STATUS status = pProgressiveDecoder->StartDecode( - pBitmap, 0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()); + status = pProgressiveDecoder->StartDecode(pBitmap, 0, 0, pBitmap->GetWidth(), + pBitmap->GetHeight()); if (IsFXCodecErrorStatus(status)) { pBitmap = nullptr; return pBitmap; |