From 7fb2215c0f5aab0ed9206c25b5e7f85d36930d75 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 31 May 2020 22:56:27 +0000 Subject: [PATCH] Use raw encoding by default if no encoding has been selected This complies with the standard. --- src/server.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/server.c b/src/server.c index 6d4425b..23559a2 100644 --- a/src/server.c +++ b/src/server.c @@ -937,7 +937,7 @@ static enum rfb_encodings choose_frame_encoding(struct nvnc_client* client) break; } - return -1; + return RFB_ENCODING_RAW; } static void do_client_update_fb(void* work) @@ -947,11 +947,6 @@ static void do_client_update_fb(void* work) struct nvnc_fb* fb = update->fb; enum rfb_encodings encoding = choose_frame_encoding(client); - if (encoding == -1) { - stream_close(client->net_stream); - client_unref(client); - return; - } if (!client->has_pixfmt) { rfb_pixfmt_from_fourcc(&client->pixfmt, fb->fourcc_format);