[Spice-devel] [PATCH 2/5] LZ4: Fix encoder output size

Christophe Fergeau cfergeau at redhat.com
Mon Jan 26 08:34:58 PST 2015


ACK.

On Thu, Jan 22, 2015 at 05:21:05PM +0100, Javier Celaya wrote:
> ---
>  server/lz4_encoder.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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);
> -- 
> 1.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150126/9793b077/attachment.sig>


More information about the Spice-devel mailing list