diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-03-23 16:28:55 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-03-23 16:28:55 +0200 |
commit | 487c77d48760564b1949c5067630b675b87be4de (patch) | |
tree | 8e098b5cec43afcc14c9250de942c30fd62c9100 /src | |
parent | xz: Add initial support for threaded decompression. (diff) | |
download | xz-487c77d48760564b1949c5067630b675b87be4de.tar.xz |
liblzma: Threaded decoder: Don't stop threads on LZMA_TIMED_OUT.
LZMA_TIMED_OUT is not an error and thus stopping threads on
LZMA_TIMED_OUT breaks the decoder badly.
Thanks to Jia Tan for finding the bug and for the patch.
Diffstat (limited to '')
-rw-r--r-- | src/liblzma/common/stream_decoder_mt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/common/stream_decoder_mt.c b/src/liblzma/common/stream_decoder_mt.c index 1f1cd771..1f77ffd3 100644 --- a/src/liblzma/common/stream_decoder_mt.c +++ b/src/liblzma/common/stream_decoder_mt.c @@ -799,7 +799,7 @@ read_output_and_wait(struct lzma_stream_coder *coder, // If we are returning an error, then the application cannot get // more output from us and thus keeping the threads running is // useless and waste of CPU time. - if (ret != LZMA_OK) + if (ret != LZMA_OK && ret != LZMA_TIMED_OUT) threads_stop(coder); return ret; |