From b31f519e278601225c53519e3b16333d86770ecf Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Fri, 4 Feb 2011 09:05:54 +0100 Subject: vnc: don't set the quality if lossy encoding are disabled 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 Signed-off-by: Anthony Liguori --- ui/vnc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui/vnc.c') diff --git a/ui/vnc.c b/ui/vnc.c index 560b98d..9c5c5b3 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); -- cgit v1.1