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 <p...@kamp.de> --- ui/vnc-jobs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 22c9abc..201d9b7 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -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) -- 1.9.1