From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51886 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGaSP-0008QB-9q for qemu-devel@nongnu.org; Thu, 11 Nov 2010 11:57:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGaSN-0005Uj-Nj for qemu-devel@nongnu.org; Thu, 11 Nov 2010 11:57:05 -0500 Received: from relay2-v.mail.gandi.net ([217.70.178.76]:33843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGaSN-0005SR-Gu for qemu-devel@nongnu.org; Thu, 11 Nov 2010 11:57:03 -0500 From: Corentin Chary Date: Thu, 11 Nov 2010 17:56:50 +0100 Message-Id: <1289494624-12807-2-git-send-email-corentincj@iksaif.net> In-Reply-To: <1289494624-12807-1-git-send-email-corentincj@iksaif.net> References: <1289494624-12807-1-git-send-email-corentincj@iksaif.net> Subject: [Qemu-devel] [PATCH v2 01/15] vnc: don't set the quality if lossy encoding are disabled List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qemu-development List Cc: Corentin Chary , Anthony Liguori , Alexander Graf , Andre Przywara This should not change the current behavior, but if any new encoding try to use the tight quality, it will always be set to -1 when lossy encodings are disabled. Signed-off-by: Corentin Chary --- ui/vnc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 864342e..7391311 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1780,7 +1780,9 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) vs->tight.compression = (enc & 0x0F); break; case VNC_ENCODING_QUALITYLEVEL0 ... VNC_ENCODING_QUALITYLEVEL0 + 9: - vs->tight.quality = (enc & 0x0F); + if (vs->vd->lossy) { + vs->tight.quality = (enc & 0x0F); + } break; default: VNC_DEBUG("Unknown encoding: %d (0x%.8x): %d\n", i, enc, enc); -- 1.7.3.2