summaryrefslogtreecommitdiffstats
path: root/camera/AppCallbackNotifier.cpp
diff options
context:
space:
mode:
authorAkwasi Boateng <akwasi.boateng@ti.com>2011-11-10 17:14:16 -0800
committerJames Dong <jdong@google.com>2011-11-11 01:07:45 -0800
commit493de8dfdcbac6041300a161ad2510a81ceb1820 (patch)
tree548386bb770f35798fed5c8aea0259c64cf5c64b /camera/AppCallbackNotifier.cpp
parent06e5743249551433a42bd4fdae5355926d36d509 (diff)
downloadhardware_ti_omap4-493de8dfdcbac6041300a161ad2510a81ceb1820.zip
hardware_ti_omap4-493de8dfdcbac6041300a161ad2510a81ceb1820.tar.gz
hardware_ti_omap4-493de8dfdcbac6041300a161ad2510a81ceb1820.tar.bz2
videosnapshot memory corruption fixes.
1. Fixes memory corruption of dst buffer in nv21_to_yuv() convertion 2. Free malloced row_tmp buffer 3. Free params string in Appcallback Change-Id: I2179f1158f6e72cca0f7e5c815b1cb576bfa925e Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> related-to-bug: 5601247
Diffstat (limited to 'camera/AppCallbackNotifier.cpp')
-rw-r--r--camera/AppCallbackNotifier.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/camera/AppCallbackNotifier.cpp b/camera/AppCallbackNotifier.cpp
index b431f54..ea0d2a8 100644
--- a/camera/AppCallbackNotifier.cpp
+++ b/camera/AppCallbackNotifier.cpp
@@ -824,7 +824,8 @@ void AppCallbackNotifier::notifyFrame()
}
CameraParameters parameters;
- const String8 strParams(mCameraHal->getParameters());
+ char *params = mCameraHal->getParameters();
+ const String8 strParams(params);
parameters.unflatten(strParams);
encode_quality = parameters.getInt(CameraParameters::KEY_JPEG_QUALITY);
@@ -894,6 +895,10 @@ void AppCallbackNotifier::notifyFrame()
encoder->run();
gEncoderQueue.add(frame->mBuffer, encoder);
encoder.clear();
+ if (params != NULL)
+ {
+ mCameraHal->putParameters(params);
+ }
}
else if ( ( CameraFrame::IMAGE_FRAME == frame->mFrameType ) &&
( NULL != mCameraHal ) &&