summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2012-05-10 14:01:39 +0300
committerAlon Levy <alevy@redhat.com>2012-05-14 10:58:09 +0300
commitca5ed4619244cca6eeaea571af824a44f771d383 (patch)
tree5ef2cf34f44dfb4e8934be280c77fafdcdc20bfd
parenta3c4dc8f36e65a49a7c5ccf549c83af90a0d2047 (diff)
downloadspice-ca5ed4619244cca6eeaea571af824a44f771d383.tar.gz
spice-ca5ed4619244cca6eeaea571af824a44f771d383.tar.xz
spice-ca5ed4619244cca6eeaea571af824a44f771d383.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. (cherry picked from commit c211774422455802299545b19ffdffd9496fdc31)
-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 74062f5a..42fe3520 100644
--- a/server/mjpeg_encoder.c
+++ b/server/mjpeg_encoder.c
@@ -144,7 +144,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;
}
/*