[Spice-devel] [PATCH] server/red_worker: use 1, not 4 when lz_encoding a top down image

Hans de Goede hdegoede at redhat.com
Tue Jan 4 23:43:15 PST 2011


Hi,

Ack. But I think you should do a patch to fix the client too. Rationale
people who hit this may be using an old server, so with the client fixed
too, hopefully at least one of the 2 sides will be of a new enough version
to be fixed and the user won't hit this.

Regards,

Hans


On 01/04/2011 05:20 PM, Alon Levy wrote:
> ---
>   server/red_worker.c |    5 +++--
>   1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/server/red_worker.c b/server/red_worker.c
> index 937e0aa..dc7bc9e 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -5439,7 +5439,8 @@ static inline int red_lz_compress_image(DisplayChannel *display_channel,
>       lz_data->data.u.lines_data.reverse = 0;
>       lz_data->usr.more_lines = lz_usr_more_lines;
>
> -    size = lz_encode(lz, type, src->x, src->y, (src->flags&  SPICE_BITMAP_FLAGS_TOP_DOWN),
> +    size = lz_encode(lz, type, src->x, src->y,
> +                     !!(src->flags&  SPICE_BITMAP_FLAGS_TOP_DOWN),
>                        NULL, 0, src->stride,
>                        (uint8_t*)lz_data->data.bufs_head->buf,
>                        sizeof(lz_data->data.bufs_head->buf));
> @@ -5588,7 +5589,7 @@ static int red_jpeg_compress_image(DisplayChannel *display_channel, SpiceImage *
>        lz_data->usr.more_lines = lz_usr_more_lines;
>
>        alpha_lz_size = lz_encode(lz, LZ_IMAGE_TYPE_XXXA, src->x, src->y,
> -                               (src->flags&  SPICE_BITMAP_FLAGS_TOP_DOWN),
> +                               !!(src->flags&  SPICE_BITMAP_FLAGS_TOP_DOWN),
>                                  NULL, 0, src->stride,
>                                  lz_out_start_byte,
>                                  comp_head_left);


More information about the Spice-devel mailing list