]> git.proxmox.com Git - qemu.git/commitdiff
vnc: don't set the quality if lossy encoding are disabled
authorCorentin Chary <corentincj@iksaif.net>
Fri, 4 Feb 2011 08:05:54 +0000 (09:05 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 23 Feb 2011 22:28:28 +0000 (16:28 -0600)
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 <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/vnc.c

index 560b98d441db263622afbbe05c3944be02a30447..9c5c5b3045a208193bfd05a48c822dc006f7dea3 100644 (file)
--- 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);