aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/stream_encoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-12-31 22:45:53 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-12-31 22:45:53 +0200
commit1a7ec87c8ee61dfc2e496d2e1fb7ab0939804691 (patch)
tree3ed5d9cc0c7629c1ca09a5df1d1193b90815cc88 /src/liblzma/common/stream_encoder.c
parentRemove c-format tag in cs.po. (diff)
downloadxz-1a7ec87c8ee61dfc2e496d2e1fb7ab0939804691.tar.xz
Revised the Index handling code.
This breaks API and ABI but most apps are not affected since most apps don't use this part of the API. You will get a compile error if you are using anything that got broken. Summary of changes: - Ability to store Stream Flags, which are needed for random-access reading in multi-Stream files. - Separate function to set size of Stream Padding. - Iterator structure makes it possible to read the same lzma_index from multiple threads at the same time. - A lot faster code to locate Blocks. - Removed lzma_index_equal() without adding anything to replace it. I don't know what it should do exactly with the new features and what actually needs this function in the first place other than test_index.c, which now has its own code to compare lzma_indexes.
Diffstat (limited to 'src/liblzma/common/stream_encoder.c')
-rw-r--r--src/liblzma/common/stream_encoder.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liblzma/common/stream_encoder.c b/src/liblzma/common/stream_encoder.c
index 705ec0eb..054e1145 100644
--- a/src/liblzma/common/stream_encoder.c
+++ b/src/liblzma/common/stream_encoder.c
@@ -292,7 +292,8 @@ lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
// Initialize the Index
- next->coder->index = lzma_index_init(next->coder->index, allocator);
+ lzma_index_end(next->coder->index, allocator);
+ next->coder->index = lzma_index_init(allocator);
if (next->coder->index == NULL)
return LZMA_MEM_ERROR;