summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_orders.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-09-19 10:59:29 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-09-19 10:59:29 -0700
commit2c021f5fab1f0f6f571874431f3d540c6f4add2f (patch)
treeb0b189006923df482bf3519f622d0ea44d7925bf /libxrdp/xrdp_orders.c
parent1d09427c57d40429bee3a7cb77fac9f37fee17b5 (diff)
downloadxrdp-proprietary-2c021f5fab1f0f6f571874431f3d540c6f4add2f.tar.gz
xrdp-proprietary-2c021f5fab1f0f6f571874431f3d540c6f4add2f.zip
don't use a global for turbo jpeg
Diffstat (limited to 'libxrdp/xrdp_orders.c')
-rw-r--r--libxrdp/xrdp_orders.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libxrdp/xrdp_orders.c b/libxrdp/xrdp_orders.c
index f753371d..1d04496e 100644
--- a/libxrdp/xrdp_orders.c
+++ b/libxrdp/xrdp_orders.c
@@ -47,6 +47,7 @@ xrdp_orders_create(struct xrdp_session *session, struct xrdp_rdp *rdp_layer)
init_stream(self->out_s, 16384);
self->orders_state.clip_right = 1; /* silly rdp right clip */
self->orders_state.clip_bottom = 1; /* silly rdp bottom clip */
+ self->jpeg_han = xrdp_jpeg_init();
return self;
}
@@ -59,6 +60,7 @@ xrdp_orders_delete(struct xrdp_orders *self)
return;
}
+ xrdp_jpeg_deinit(self->jpeg_han);
free_stream(self->out_s);
g_free(self->orders_state.text_data);
g_free(self);
@@ -2394,7 +2396,7 @@ xrdp_orders_send_bitmap3(struct xrdp_orders *self,
make_stream(temp_s);
init_stream(temp_s, 16384);
quality = ci->jpeg_prop[0];
- xrdp_jpeg_compress(data, width, height, xr_s, bpp, 16384,
+ xrdp_jpeg_compress(self->jpeg_han, data, width, height, xr_s, bpp, 16384,
height - 1, temp_s, e, quality);
s_mark_end(xr_s);
bufsize = (int)(xr_s->end - xr_s->data);