diff options
author | Javier Celaya <javier.celaya@flexvm.es> | 2015-01-26 17:22:46 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-02-03 10:39:16 +0100 |
commit | d92ce3506e3f6a382b87af8ed9296beb229683df (patch) | |
tree | 89f923817539240f9711a6e057adb04d44c46d5e | |
parent | d6f22b2787d773927488cc1b7f4c86a335bff37e (diff) |
LZ4: Fix encoder output size
-rw-r--r-- | server/lz4_encoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lz4_encoder.c b/server/lz4_encoder.c index 531ab4b..aa03721 100644 --- a/server/lz4_encoder.c +++ b/server/lz4_encoder.c @@ -56,7 +56,7 @@ int lz4_encode(Lz4EncoderContext *lz4, int height, int stride, uint8_t *lines; int num_lines = 0; int total_lines = 0; - int in_size, enc_size, out_size = 0, already_copied; + int in_size, enc_size, out_size, already_copied; int stride_abs = abs(stride); uint8_t *in_buf, *compressed_lines; uint8_t *out_buf = io_ptr; @@ -65,6 +65,7 @@ int lz4_encode(Lz4EncoderContext *lz4, int height, int stride, // Encode direction *(out_buf++) = stride < 0 ? 1 : 0; num_io_bytes--; + out_size = 1; do { num_lines = enc->usr->more_lines(enc->usr, &lines); |