diff options
author | Andriy Chepurnyy <x0155536@ti.com> | 2013-05-30 17:24:47 +0300 |
---|---|---|
committer | Hashcode <hashcode0f@gmail.com> | 2015-02-03 13:41:01 -0800 |
commit | c0eb0990aa53ef0574c3fa4943c1d4de5732bf30 (patch) | |
tree | 0af933575e195f0dacd75980cb436e51ed3752ea /camera | |
parent | 542ff51f3534c7df6a6b80ca11b2d22cbcbaf073 (diff) | |
download | hardware_ti_omap4-c0eb0990aa53ef0574c3fa4943c1d4de5732bf30.zip hardware_ti_omap4-c0eb0990aa53ef0574c3fa4943c1d4de5732bf30.tar.gz hardware_ti_omap4-c0eb0990aa53ef0574c3fa4943c1d4de5732bf30.tar.bz2 |
CameraHAL: Snapshot buffers reference counter fix
Use CameraBuffer* instead of uint for key in
snapshot subscribers map.
Change-Id: I1fc800840e120e535c3197b9856d6a1da48c4e7a
Signed-off-by: Andriy Chepurnyy <x0155536@ti.com>
Diffstat (limited to 'camera')
-rw-r--r-- | camera/BaseCameraAdapter.cpp | 4 | ||||
-rw-r--r-- | camera/inc/BaseCameraAdapter.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/camera/BaseCameraAdapter.cpp b/camera/BaseCameraAdapter.cpp index 84cde37..aa12b05 100644 --- a/camera/BaseCameraAdapter.cpp +++ b/camera/BaseCameraAdapter.cpp @@ -1495,7 +1495,7 @@ int BaseCameraAdapter::getFrameRefCount(CameraBuffer * frameBuf, CameraFrame::Fr case CameraFrame::SNAPSHOT_FRAME: { android::AutoMutex lock(mSnapshotBufferLock); - res = mSnapshotBuffersAvailable.valueFor( ( unsigned int ) frameBuf ); + res = mSnapshotBuffersAvailable.valueFor(frameBuf ); } break; case CameraFrame::PREVIEW_FRAME_SYNC: @@ -1547,7 +1547,7 @@ void BaseCameraAdapter::setFrameRefCount(CameraBuffer * frameBuf, CameraFrame::F case CameraFrame::SNAPSHOT_FRAME: { android::AutoMutex lock(mSnapshotBufferLock); - mSnapshotBuffersAvailable.replaceValueFor( ( unsigned int ) frameBuf, refCount); + mSnapshotBuffersAvailable.replaceValueFor(frameBuf, refCount); } break; case CameraFrame::PREVIEW_FRAME_SYNC: diff --git a/camera/inc/BaseCameraAdapter.h b/camera/inc/BaseCameraAdapter.h index c605df1..185d58e 100644 --- a/camera/inc/BaseCameraAdapter.h +++ b/camera/inc/BaseCameraAdapter.h @@ -246,7 +246,7 @@ protected: mutable android::Mutex mPreviewBufferLock; //Snapshot buffer management data - android::KeyedVector<int, int> mSnapshotBuffersAvailable; + android::KeyedVector<CameraBuffer *, int> mSnapshotBuffersAvailable; mutable android::Mutex mSnapshotBufferLock; //Video buffer management data |