summaryrefslogtreecommitdiffstats
path: root/camera/AppCallbackNotifier.cpp
diff options
context:
space:
mode:
authorEmilian Peev <epeev@mm-sol.com>2012-07-13 17:22:33 +0300
committerDaniel Levin <dendy@ti.com>2012-11-26 18:41:31 +0200
commit08e7c5cbe3852cae76ea7af23b91e37d03da1c4d (patch)
tree244b40a8110afe780dfe6f91499202c89b6a6307 /camera/AppCallbackNotifier.cpp
parenta2051510fb28c0b856b18b91dca25754aec22256 (diff)
downloadhardware_ti_omap4-08e7c5cbe3852cae76ea7af23b91e37d03da1c4d.zip
hardware_ti_omap4-08e7c5cbe3852cae76ea7af23b91e37d03da1c4d.tar.gz
hardware_ti_omap4-08e7c5cbe3852cae76ea7af23b91e37d03da1c4d.tar.bz2
camera: Copy and crop only raw frames
- AppCallbackNotifier was trying to copy and crop compressed image frames during reprocessing. This might lead to arithmetic faults when the frame fields are not fully initialized as in the case of compressed images. Change-Id: Ic7d6eb71aee546d7f5619075a6070a861ebcacb0 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Diffstat (limited to 'camera/AppCallbackNotifier.cpp')
-rw-r--r--camera/AppCallbackNotifier.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/camera/AppCallbackNotifier.cpp b/camera/AppCallbackNotifier.cpp
index 2623fcb..e7f2b19 100644
--- a/camera/AppCallbackNotifier.cpp
+++ b/camera/AppCallbackNotifier.cpp
@@ -752,7 +752,8 @@ void AppCallbackNotifier::copyAndSendPictureFrame(CameraFrame* frame, int32_t ms
if (frame->mBuffer->format &&
(strcmp(frame->mBuffer->format, android::CameraParameters::PIXEL_FORMAT_YUV420SP) == 0) &&
- (frame->mAlignment != frame->mWidth)) {
+ (frame->mAlignment != frame->mWidth) &&
+ ( msgType == CAMERA_MSG_RAW_IMAGE )) {
size_t size;
size = CameraHal::calculateBufferSize(frame->mBuffer->format, frame->mWidth, frame->mHeight);