Free encoded frames after sending them
parent
85c6ce0729
commit
6660df4d8d
|
@ -747,6 +747,12 @@ void nvnc_close(struct nvnc *self)
|
||||||
free(self);
|
free(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void free_write_buffer(uv_write_t *req, int status)
|
||||||
|
{
|
||||||
|
struct vnc_write_request *rq = (struct vnc_write_request*)req;
|
||||||
|
free(rq->buffer.base);
|
||||||
|
}
|
||||||
|
|
||||||
EXPORT
|
EXPORT
|
||||||
int nvnc_update_fb(struct nvnc *self, const struct nvnc_fb *fb,
|
int nvnc_update_fb(struct nvnc *self, const struct nvnc_fb *fb,
|
||||||
const struct pixman_region16 *input_region)
|
const struct pixman_region16 *input_region)
|
||||||
|
@ -786,7 +792,7 @@ int nvnc_update_fb(struct nvnc *self, const struct nvnc_fb *fb,
|
||||||
pixman_region_clear(cregion);
|
pixman_region_clear(cregion);
|
||||||
|
|
||||||
vnc__write((uv_stream_t*)&client->stream_handle, frame.data,
|
vnc__write((uv_stream_t*)&client->stream_handle, frame.data,
|
||||||
frame.len, NULL);
|
frame.len, free_write_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
|
Loading…
Reference in New Issue