aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2022-05-05 20:53:42 +0800
committerLasse Collin <lasse.collin@tukaani.org>2022-11-24 10:58:04 +0200
commitb0f8d9293ca5a0a56964695a59a098c9d1e82b99 (patch)
tree3c5cb37f6e28755fd55382b937a0c06a329f6698 /src
parentliblzma: Add lzma_attr_warn_unused_result to lzma_filters_copy(). (diff)
downloadxz-b0f8d9293ca5a0a56964695a59a098c9d1e82b99.tar.xz
liblzma: Add support for LZMA_SYNC_FLUSH in the Block encoder.
The documentation mentions that lzma_block_encoder() supports LZMA_SYNC_FLUSH but it was never added to supported_actions[] in the internal structure. Because of this, LZMA_SYNC_FLUSH could not be used with the Block encoder unless it was the next coder after something like stream_encoder() or stream_encoder_mt().
Diffstat (limited to 'src')
-rw-r--r--src/liblzma/common/block_encoder.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liblzma/common/block_encoder.c b/src/liblzma/common/block_encoder.c
index 168846ad..520ecc5a 100644
--- a/src/liblzma/common/block_encoder.c
+++ b/src/liblzma/common/block_encoder.c
@@ -217,6 +217,7 @@ lzma_block_encoder(lzma_stream *strm, lzma_block *block)
lzma_next_strm_init(lzma_block_encoder_init, strm, block);
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;