From 8e69aa1d57c8b818f495ce5f32165da6dc73a352 Mon Sep 17 00:00:00 2001 From: totaam Date: Mon, 7 Feb 2022 10:14:46 +0700 Subject: [PATCH] #122 require 'rencodeplus' for decode worker --- html5/js/Client.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/html5/js/Client.js b/html5/js/Client.js index 20bd5126..1e40328d 100644 --- a/html5/js/Client.js +++ b/html5/js/Client.js @@ -2125,6 +2125,11 @@ XpraClient.prototype._process_hello = function(packet, ctx) { break; } } + //don't use offscreen or decode worker with 'rencodeplus': + if (ctx.decode_worker && ctx.packet_encoder!="rencodeplus") { + ctx.decode_worker = null; + ctx.offscreen_api = false; + } // find the modifier to use for Num_Lock const modifier_keycodes = hello['modifier_keycodes']; @@ -3157,7 +3162,7 @@ XpraClient.prototype._process_draw = function(packet, ctx) { } raw_buffers.push(img_data.buffer); } - if (ctx.decode_worker && ctx.packet_encoder=="rencodeplus") { + if (ctx.decode_worker) { ctx.decode_worker.postMessage({'cmd': 'decode', 'packet' : packet, 'start' : now}, raw_buffers); //the worker draw event will call do_process_draw }