4.45 beta

This commit is contained in:
Igor Pavlov
2007-04-17 00:00:00 +00:00
committed by Kornel Lesiński
parent d9666cf046
commit a145bfc7cf
458 changed files with 13144 additions and 18608 deletions

View File

@@ -11,7 +11,7 @@ STDMETHODIMP CSequentialInStreamWithCRC::Read(void *data, UInt32 size, UInt32 *p
_size += realProcessedSize;
if (size > 0 && realProcessedSize == 0)
_wasFinished = true;
_crc.Update(data, realProcessedSize);
_crc = CrcUpdate(_crc, data, realProcessedSize);
if(processedSize != NULL)
*processedSize = realProcessedSize;
return result;
@@ -24,18 +24,17 @@ STDMETHODIMP CInStreamWithCRC::Read(void *data, UInt32 size, UInt32 *processedSi
if (size > 0 && realProcessedSize == 0)
_wasFinished = true;
_size += realProcessedSize;
_crc.Update(data, realProcessedSize);
_crc = CrcUpdate(_crc, data, realProcessedSize);
if(processedSize != NULL)
*processedSize = realProcessedSize;
return result;
}
STDMETHODIMP CInStreamWithCRC::Seek(Int64 offset,
UInt32 seekOrigin, UInt64 *newPosition)
STDMETHODIMP CInStreamWithCRC::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
{
if (seekOrigin != STREAM_SEEK_SET || offset != 0)
return E_FAIL;
_size = 0;
_crc.Init();
_crc = CRC_INIT_VAL;
return _stream->Seek(offset, seekOrigin, newPosition);
}