API : changed : streaming decompression : implicit reset on starting new frames

This commit is contained in:
Yann Collet
2016-12-02 18:37:38 -08:00
parent db85a6e09a
commit 9ffbeea875
4 changed files with 21 additions and 8 deletions
+2 -1
View File
@@ -1959,7 +1959,8 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
switch(zds->stage)
{
case zdss_init :
return ERROR(init_missing);
ZSTD_resetDStream(zds); /* transparent reset on starting decoding a new frame */
/* fall-through */
case zdss_loadHeader :
{ size_t const hSize = ZSTD_getFrameParams(&zds->fParams, zds->headerBuffer, zds->lhSize);