]> granicus.if.org Git - xz/commitdiff
Don't allow LZMA_SYNC_FLUSH with decoders anymore. There's
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 4 Sep 2008 07:39:15 +0000 (10:39 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 4 Sep 2008 07:39:15 +0000 (10:39 +0300)
simply nothing that would use it. Allow LZMA_FINISH to the
decoders, which will usually ignore it (auto decoder and
Stream decoder being exceptions).

src/liblzma/common/alone_decoder.c
src/liblzma/common/block_decoder.c
src/liblzma/common/filter_decoder.c

index 006740f4eeb3004f3920df8158cef240b739f8c0..4c76ae71615f8b636d81e0efca521c3ab6271a13 100644 (file)
@@ -213,7 +213,6 @@ lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
        lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit);
 
        strm->internal->supported_actions[LZMA_RUN] = true;
-//     strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true; FIXME
        strm->internal->supported_actions[LZMA_FINISH] = true;
 
        return LZMA_OK;
index 2c16a20440c09b7fe1e946484ae0a17c6b3fbdb9..eab25a88cdb872a193466de4eb643105e60f64d1 100644 (file)
@@ -227,7 +227,7 @@ lzma_block_decoder(lzma_stream *strm, lzma_block *options)
        lzma_next_strm_init(lzma_block_decoder_init, strm, options);
 
        strm->internal->supported_actions[LZMA_RUN] = true;
-       strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
+       strm->internal->supported_actions[LZMA_FINISH] = true;
 
        return LZMA_OK;
 }
index 9fe94f7b78b347d087447e67ebbeb03e36f61900..5eb6d770356dbd5f48e3a1357dbcb24d107526af 100644 (file)
@@ -203,7 +203,7 @@ lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
        lzma_next_strm_init(lzma_raw_decoder_init, strm, options);
 
        strm->internal->supported_actions[LZMA_RUN] = true;
-       strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
+       strm->internal->supported_actions[LZMA_FINISH] = true;
 
        return LZMA_OK;
 }