diff options
author | Zhijun He <zhijunhe@google.com> | 2013-09-15 21:06:10 -0700 |
---|---|---|
committer | Zhijun He <zhijunhe@google.com> | 2013-09-16 09:23:58 -0700 |
commit | 527748abf04c0060894fd7aace54959a2c343435 (patch) | |
tree | 667faa9827035f34685c0525ccac1289c6d844f9 /services | |
parent | 66281c3a5d7eea486ddc6ad30088ba92956fd4fd (diff) | |
download | frameworks_av-527748abf04c0060894fd7aace54959a2c343435.zip frameworks_av-527748abf04c0060894fd7aace54959a2c343435.tar.gz frameworks_av-527748abf04c0060894fd7aace54959a2c343435.tar.bz2 |
Camera: setCallBackWindow only if callback surface is used
Calling setCallBackWindow without checking the previewCallbackSurface could make
the stream to be deleted during callback stream operation, which is bad because
the preview is still active and the delete fails.
Bug: 10730496
Change-Id: I8addac25e5aa7901bf200d730c749bee2c088090
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/api1/Camera2Client.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/api1/Camera2Client.cpp b/services/camera/libcameraservice/api1/Camera2Client.cpp index bda2887..e7f6c53 100644 --- a/services/camera/libcameraservice/api1/Camera2Client.cpp +++ b/services/camera/libcameraservice/api1/Camera2Client.cpp @@ -604,7 +604,7 @@ void Camera2Client::setPreviewCallbackFlagL(Parameters ¶ms, int flag) { } if (params.previewCallbackFlags != (uint32_t)flag) { - if (flag != CAMERA_FRAME_CALLBACK_FLAG_NOOP) { + if (params.previewCallbackSurface && flag != CAMERA_FRAME_CALLBACK_FLAG_NOOP) { // Disable any existing preview callback window when enabling // preview callback flags res = mCallbackProcessor->setCallbackWindow(NULL); |