mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-16 22:11:49 -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;
|
DProps *pProps = (DProps *)prop;
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
printf("prop size =%u\n", size);
|
||||||
|
fflush(stdout);
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 3:
|
case 3:
|
||||||
memcpy(&_props, pProps, 3);
|
memcpy(&_props, pProps, 3);
|
||||||
@@ -133,6 +138,10 @@ HRESULT CDecoder::CodeSpec(ISequentialInStream * inStream,
|
|||||||
if (zIn.pos == zIn.size)
|
if (zIn.pos == zIn.size)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* end of frame, but more data there... */
|
||||||
|
if (result == 0 && zIn.pos != zIn.size)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* end of frame */
|
/* end of frame */
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
result = ZSTD_resetDStream(_ctx);
|
result = ZSTD_resetDStream(_ctx);
|
||||||
|
|||||||
Reference in New Issue
Block a user