summaryrefslogtreecommitdiffstats
path: root/server/mjpeg_encoder.c
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2012-05-10 14:01:39 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-05-10 14:06:59 +0300
commitc211774422455802299545b19ffdffd9496fdc31 (patch)
tree56c880efa6ea99f4ec6f023700112f30d8e6943f /server/mjpeg_encoder.c
parentfecc1e3d4d3d93ade71a318ad655e85974638162 (diff)
downloadspice-c211774422455802299545b19ffdffd9496fdc31.tar.gz
spice-c211774422455802299545b19ffdffd9496fdc31.tar.xz
spice-c211774422455802299545b19ffdffd9496fdc31.zip
server/mjpeg_encoder: fix wrong size assigned to dest_len
It should have been the allocated size and not the occupied one. This led to a lot of unnecessary allocations and deallocations.
Diffstat (limited to 'server/mjpeg_encoder.c')
-rw-r--r--server/mjpeg_encoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c
index 3c2fc31c..6bb2f699 100644
--- a/server/mjpeg_encoder.c
+++ b/server/mjpeg_encoder.c
@@ -140,7 +140,7 @@ static void term_mem_destination(j_compress_ptr cinfo)
mem_destination_mgr *dest = (mem_destination_mgr *) cinfo->dest;
*dest->outbuffer = dest->buffer;
- *dest->outsize = dest->bufsize - dest->pub.free_in_buffer;
+ *dest->outsize = dest->bufsize;
}
/*