Bcj2Coder.cpp (p7zip_15.14.1_src_all) | : | Bcj2Coder.cpp (p7zip_16.02_src_all) | ||
---|---|---|---|---|
skipping to change at line 509 | skipping to change at line 509 | |||
return S_FALSE; | return S_FALSE; | |||
} | } | |||
} | } | |||
} | } | |||
return S_OK; | return S_OK; | |||
} | } | |||
STDMETHODIMP CDecoder::SetInStream2(UInt32 streamIndex, ISequentialInStream *inS tream) | STDMETHODIMP CDecoder::SetInStream2(UInt32 streamIndex, ISequentialInStream *inS tream) | |||
{ | { | |||
inStreams[streamIndex] = inStream; | _inStreams[streamIndex] = inStream; | |||
return S_OK; | return S_OK; | |||
} | } | |||
STDMETHODIMP CDecoder::ReleaseInStream2(UInt32 streamIndex) | STDMETHODIMP CDecoder::ReleaseInStream2(UInt32 streamIndex) | |||
{ | { | |||
inStreams[streamIndex].Release(); | _inStreams[streamIndex].Release(); | |||
return S_OK; | return S_OK; | |||
} | } | |||
STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize) | STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize) | |||
{ | { | |||
_outSizeDefined = (outSize != NULL); | _outSizeDefined = (outSize != NULL); | |||
_outSize = 0; | _outSize = 0; | |||
if (_outSizeDefined) | if (_outSizeDefined) | |||
_outSize = *outSize; | _outSize = *outSize; | |||
skipping to change at line 595 | skipping to change at line 595 | |||
dec.lims[dec.state] = | dec.lims[dec.state] = | |||
dec.bufs[dec.state] = buf; | dec.bufs[dec.state] = buf; | |||
} | } | |||
if (_readRes[dec.state] != S_OK) | if (_readRes[dec.state] != S_OK) | |||
return _readRes[dec.state]; | return _readRes[dec.state]; | |||
do | do | |||
{ | { | |||
UInt32 curSize = _bufsCurSizes[dec.state] - (UInt32)totalRead; | UInt32 curSize = _bufsCurSizes[dec.state] - (UInt32)totalRead; | |||
HRESULT res2 = inStreams[dec.state]->Read(_bufs[dec.state] + totalRead, curSize, &curSize); | HRESULT res2 = _inStreams[dec.state]->Read(_bufs[dec.state] + totalRead, curSize, &curSize); | |||
_readRes[dec.state] = res2; | _readRes[dec.state] = res2; | |||
if (curSize == 0) | if (curSize == 0) | |||
break; | break; | |||
_inStreamsProcessed[dec.state] += curSize; | _inStreamsProcessed[dec.state] += curSize; | |||
totalRead += curSize; | totalRead += curSize; | |||
if (res2 != S_OK) | if (res2 != S_OK) | |||
break; | break; | |||
} | } | |||
while (totalRead < 4 && BCJ2_IS_32BIT_STREAM(dec.state)); | while (totalRead < 4 && BCJ2_IS_32BIT_STREAM(dec.state)); | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |