summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-11-15 10:38:37 -0800
committerJames Dong <jdong@google.com>2010-11-15 13:14:59 -0800
commitc42478ed7b8a379d2f8a43d4d349680c8a37573f (patch)
tree5e0130097b1017a6348c101a5093269a82431fd6 /camera
parentc2db5a15b819368c2c19099cc912c095a45e6bac (diff)
downloadframeworks_av-c42478ed7b8a379d2f8a43d4d349680c8a37573f.zip
frameworks_av-c42478ed7b8a379d2f8a43d4d349680c8a37573f.tar.gz
frameworks_av-c42478ed7b8a379d2f8a43d4d349680c8a37573f.tar.bz2
Fixed a race condition where some recording frames may not be released.
When startRecording() is called before setListener(), recording frames are sent right after startRecording(), but there is no listener to release the recording frames. This causes the hang in media server. bug - 3166356 Change-Id: I19366ca682ef9f6b847590c190c30a15ed32b8e4
Diffstat (limited to 'camera')
-rw-r--r--camera/Camera.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp
index 148e864..450971d 100644
--- a/camera/Camera.cpp
+++ b/camera/Camera.cpp
@@ -372,6 +372,9 @@ void Camera::dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType, const sp<
}
if (listener != NULL) {
listener->postDataTimestamp(timestamp, msgType, dataPtr);
+ } else {
+ LOGW("No listener was set. Drop a recording frame.");
+ releaseRecordingFrame(dataPtr);
}
}