OSDN Git Service

Fixes Camera Panorama mode save panorama issue
authoryi.xie <yi.xie@intel.com>
Fri, 9 Mar 2012 10:06:27 +0000 (12:06 +0200)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 25 Sep 2013 02:48:21 +0000 (10:48 +0800)
Sometimes, Panorama mode of the Camera app was not able to save
the picture taken.
Issue was caused by a memory leak. Captured panorama is converted to
compressed JPEG. After compress, memory used in the process was not
freed. Compressor must free memory explicitly.

Change-Id: I892fe99826f40cbddad44a00ba74616f17066b49
Original-Change-Id: I1b2d00bf54866b9ff55843cdeed93cd92d4f89d6
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
core/jni/android/graphics/YuvToJpegEncoder.cpp

index f386905..d9d5b89 100644 (file)
@@ -43,6 +43,7 @@ bool YuvToJpegEncoder::encode(SkWStream* stream, void* inYuv, int width,
     compress(&cinfo, (uint8_t*) inYuv, offsets);
 
     jpeg_finish_compress(&cinfo);
+    jpeg_destroy_compress(&cinfo);
 
     return true;
 }