mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 08:07:06 -06:00
Fix decompression of skippable zstd frames
This commit is contained in:
@@ -37,6 +37,11 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte * prop, UInt32 size)
|
||||
{
|
||||
DProps *pProps = (DProps *)prop;
|
||||
|
||||
#if DEBUG
|
||||
printf("prop size =%u\n", size);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
switch (size) {
|
||||
case 3:
|
||||
memcpy(&_props, pProps, 3);
|
||||
@@ -133,6 +138,10 @@ HRESULT CDecoder::CodeSpec(ISequentialInStream * inStream,
|
||||
if (zIn.pos == zIn.size)
|
||||
break;
|
||||
|
||||
/* end of frame, but more data there... */
|
||||
if (result == 0 && zIn.pos != zIn.size)
|
||||
continue;
|
||||
|
||||
/* end of frame */
|
||||
if (result == 0) {
|
||||
result = ZSTD_resetDStream(_ctx);
|
||||
|
||||
Reference in New Issue
Block a user