29 lines
898 B
Diff
29 lines
898 B
Diff
From 29f70d96d44fc4eaf3ffb027ce22cd4f8509b2bf Mon Sep 17 00:00:00 2001
|
|
From: Yonit Halperin <yhalperi@redhat.com>
|
|
Date: Thu, 10 May 2012 14:01:39 +0300
|
|
Subject: [PATCH 8/8] 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.
|
|
---
|
|
server/mjpeg_encoder.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c
|
|
index 74062f5..42fe352 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;
|
|
}
|
|
|
|
/*
|
|
--
|
|
1.7.10.1
|
|
|