From 560fb8053da5c14ef4b617cad5813a20c2e2f154 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Tue, 23 Aug 2022 22:32:49 +0000 Subject: [PATCH] server: Fix encoding selection for sw frames This fixes encoding selection when not using the --gpu option. Before this change, raw encoding would always be selected. Reported-by: Consolatis Suggested-by: Consolatis --- src/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 6b578fc..b1ef5e0 100644 --- a/src/server.c +++ b/src/server.c @@ -1353,13 +1353,14 @@ static enum rfb_encodings choose_frame_encoding(struct nvnc_client* client, case RFB_ENCODING_RAW: case RFB_ENCODING_TIGHT: case RFB_ENCODING_ZRLE: + return client->encodings[i]; #ifdef ENABLE_OPEN_H264 case RFB_ENCODING_OPEN_H264: // h264 is useless for sw frames if (fb->type != NVNC_FB_GBM_BO) break; -#endif return client->encodings[i]; +#endif default: break; }