summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSundar Raman <sunds@ti.com>2011-09-13 07:05:10 -0700
committerIliyan Malchev <malchev@google.com>2011-09-14 16:00:42 -0700
commit791689f507edee5899b5fbb162d33bce8a7febd6 (patch)
tree999b477ce83e46ef02afdfe4edaf15228c2b6e43
parentd641861be5d52d3e89f676fecd1571088fd57dcc (diff)
downloadhardware_ti_omap4-791689f507edee5899b5fbb162d33bce8a7febd6.zip
hardware_ti_omap4-791689f507edee5899b5fbb162d33bce8a7febd6.tar.gz
hardware_ti_omap4-791689f507edee5899b5fbb162d33bce8a7febd6.tar.bz2
CameraHAL: HomeScreen Fix: Make releaseImageBuffers a no-op
1. Make releaseImageBuffers a no-op for now because it is racing against AppCallbackNotifier 2. Move freeImageBufs during exit to be called after the AppCallbackNotifier exit. Change-Id: Ia127f5799dadb58f75dd6b2ebe8d58aed2303d60 Signed-off-by: Sundar Raman <sunds@ti.com>
-rw-r--r--camera/CameraHal.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp
index 3f1650b..5f18341 100644
--- a/camera/CameraHal.cpp
+++ b/camera/CameraHal.cpp
@@ -1198,11 +1198,16 @@ void releaseImageBuffers(void *userData)
{
LOG_FUNCTION_NAME;
+// Make releaseImageBuffers a no-op for now because it is racing against AppCallbackNotifier
+// in the home screen use-case. Image capture buffers are anyways reallocated on subsequent
+// captures and also released as part of final camera hal cleanup
+#if 0
if ( NULL != userData )
{
CameraHal *c = reinterpret_cast<CameraHal *>(userData);
c->freeImageBufs();
}
+#endif
LOG_FUNCTION_NAME_EXIT;
}
@@ -2665,9 +2670,6 @@ CameraHal::~CameraHal()
/// Free the callback notifier
mAppCallbackNotifier.clear();
- /// Free the memory manager
- mMemoryManager.clear();
-
/// Free the display adapter
mDisplayAdapter.clear();
@@ -2679,6 +2681,11 @@ CameraHal::~CameraHal()
mCameraAdapter = NULL;
}
+ freeImageBufs();
+
+ /// Free the memory manager
+ mMemoryManager.clear();
+
LOG_FUNCTION_NAME_EXIT;
}
@@ -3233,8 +3240,6 @@ void CameraHal::deinitialize()
forceStopPreview();
}
- freeImageBufs();
-
mSetPreviewWindowCalled = false;
if (mSensorListener.get()) {