diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-05-10 14:01:39 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-05-10 14:06:59 +0300 |
commit | c211774422455802299545b19ffdffd9496fdc31 (patch) | |
tree | 56c880efa6ea99f4ec6f023700112f30d8e6943f | |
parent | fecc1e3d4d3d93ade71a318ad655e85974638162 (diff) | |
download | spice-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.
-rw-r--r-- | server/mjpeg_encoder.c | 2 |
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; } /* |