From 177bdc922cb17bd0fd831ab8139dfae912a5c2b8 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 17 Sep 2022 22:42:18 +0300 Subject: liblzma: Simple/BCJ filters: Allow disabling generic BCJ options. This will be needed for the ARM64 BCJ filter as it will use its own options struct. --- src/liblzma/simple/simple_coder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/liblzma/simple/simple_coder.c') diff --git a/src/liblzma/simple/simple_coder.c b/src/liblzma/simple/simple_coder.c index 4f499bef..59018366 100644 --- a/src/liblzma/simple/simple_coder.c +++ b/src/liblzma/simple/simple_coder.c @@ -237,7 +237,7 @@ lzma_simple_coder_init(lzma_next_coder *next, const lzma_allocator *allocator, size_t (*filter)(void *simple, uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size), size_t simple_size, size_t unfiltered_max, - uint32_t alignment, bool is_encoder) + uint32_t alignment, bool is_encoder, bool is_generic_bcj) { // Allocate memory for the lzma_simple_coder structure if needed. lzma_simple_coder *coder = next->coder; @@ -270,7 +270,7 @@ lzma_simple_coder_init(lzma_next_coder *next, const lzma_allocator *allocator, } } - if (filters[0].options != NULL) { + if (is_generic_bcj && filters[0].options != NULL) { const lzma_options_bcj *simple = filters[0].options; coder->now_pos = simple->start_offset; if (coder->now_pos & (alignment - 1)) -- cgit v1.2.3