From: Mati Shabtay Date: Mon, 18 Mar 2019 14:05:07 +0000 (+0200) Subject: client/rdpgfx_main.c: Fix wire to surface 2 pixel format decode X-Git-Tag: 2.0.0~509^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d808226afe4aec7ea6ddd0a7c625c7736dfd20c;p=platform%2Fupstream%2Ffreerdp.git client/rdpgfx_main.c: Fix wire to surface 2 pixel format decode --- diff --git a/channels/rdpgfx/client/rdpgfx_main.c b/channels/rdpgfx/client/rdpgfx_main.c index 561ea85..bd3b993 100644 --- a/channels/rdpgfx/client/rdpgfx_main.c +++ b/channels/rdpgfx/client/rdpgfx_main.c @@ -792,7 +792,21 @@ static UINT rdpgfx_recv_wire_to_surface_2_pdu(RDPGFX_CHANNEL_CALLBACK* callback, cmd.surfaceId = pdu.surfaceId; cmd.codecId = pdu.codecId; cmd.contextId = pdu.codecContextId; - cmd.format = pdu.pixelFormat; + + switch (pdu.pixelFormat) + { + case GFX_PIXEL_FORMAT_XRGB_8888: + cmd.format = PIXEL_FORMAT_BGRX32; + break; + + case GFX_PIXEL_FORMAT_ARGB_8888: + cmd.format = PIXEL_FORMAT_BGRA32; + break; + + default: + return ERROR_INVALID_DATA; + } + cmd.left = 0; cmd.top = 0; cmd.right = 0;