From patchwork Wed Aug 11 05:49:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 61441 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 34013B70AB for ; Wed, 11 Aug 2010 15:54:35 +1000 (EST) Received: from localhost ([127.0.0.1]:39667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oj4Gm-0007Kr-4b for incoming@patchwork.ozlabs.org; Wed, 11 Aug 2010 01:54:32 -0400 Received: from [140.186.70.92] (port=37795 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oj4Ca-0005hQ-W0 for qemu-devel@nongnu.org; Wed, 11 Aug 2010 01:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oj4CZ-0007OO-Ja for qemu-devel@nongnu.org; Wed, 11 Aug 2010 01:50:12 -0400 Received: from relay1-v.mail.gandi.net ([217.70.178.75]:53233 helo=mrelay1-v.mgt.gandi.net) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oj4CZ-0007OI-Bm for qemu-devel@nongnu.org; Wed, 11 Aug 2010 01:50:11 -0400 X-Originating-IP: 217.70.178.45 Received: from mfilter4-d.gandi.net (mfilter4-d.gandi.net [217.70.178.45]) by mrelay1-v.mgt.gandi.net (Postfix) with ESMTP id ABBA8362BF; Wed, 11 Aug 2010 07:50:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter4-d.gandi.net Received: from mrelay1-v.mgt.gandi.net ([217.70.178.75]) by mfilter4-d.gandi.net (mfilter4-d.gandi.net [217.70.178.45]) (amavisd-new, port 10024) with ESMTP id qbX5KGXfLfE2; Wed, 11 Aug 2010 07:50:08 +0200 (CEST) X-Originating-IP: 82.241.209.44 Received: from tartiflon (falgoret.iksaif.net [82.241.209.44]) (Authenticated sender: fake@iksaif.net) by mrelay1-v.mgt.gandi.net (Postfix) with ESMTPSA id 92422362B8; Wed, 11 Aug 2010 07:50:03 +0200 (CEST) From: Corentin Chary To: Qemu-development List Date: Wed, 11 Aug 2010 07:49:31 +0200 Message-Id: <1281505785-22523-2-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1281505785-22523-1-git-send-email-corentincj@iksaif.net> References: <1281505785-22523-1-git-send-email-corentincj@iksaif.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Corentin Chary , Anthony Liguori , Alexander Graf , Andre Przywara Subject: [Qemu-devel] [PATCH 01/15] vnc: don't set the quality if lossy encoding are disabled X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 7fc40ac..3086d95 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1776,7 +1776,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);