@@ -195,8 +195,6 @@ static void vnc_async_encoding_start(VncState *orig, VncState *local)
local->zrle = orig->zrle;
local->output = queue->buffer;
local->csock = -1; /* Don't do any network work on this thread */
-
- buffer_reset(&local->output);
}
static void vnc_async_encoding_end(VncState *orig, VncState *local)
@@ -208,6 +206,7 @@ static void vnc_async_encoding_end(VncState *orig, VncState *local)
orig->lossy_rect = local->lossy_rect;
queue->buffer = local->output;
+ buffer_reset(&queue->buffer);
}
static int vnc_worker_thread_loop(VncJobQueue *queue)
now that we are able to shrink the buffer it makes sense to move the buffer_reset to vnc_async_encoding_end to actually shrink the buffer when it is no longer used. Signed-off-by: Peter Lieven <pl@kamp.de> --- ui/vnc-jobs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)