diff options
author | Mikhail Naganov <mnaganov@google.com> | 2017-12-21 13:14:27 -0800 |
---|---|---|
committer | Mikhail Naganov <mnaganov@google.com> | 2017-12-21 13:21:58 -0800 |
commit | 718b51008095493e2ba0f2a0e3b98d1b2decd794 (patch) | |
tree | e71570d57ee9dd226c7326cc835ecaa355943458 /camera/common/1.0/default/CameraModule.cpp | |
parent | f43ab227a5465b1fa03c2ba257e7db7d53f94e67 (diff) |
audio: Fix StreamOut ownership in default wrapper
StreamOut::asyncCallback could became an owner of StreamOut
causing the destructor to be called on the offload callback
thread, while the legacy HAL is holding a mutex, which resulted
in a deadlock.
Removed erroneous usage of sp<StreamOut> in asyncCallback.
The legacy HAL joins the offload callback thread when closing
output stream, thus StreamOut destructor is guaranteed to finish
only after the offload callback thread has exited, and using
a raw pointer to StreamOut inside asyncCallback is correct.
Bug: 70863217
Change-Id: I0d77018cf3df5ad07251732733288d425dd836eb
Test: manual
Diffstat (limited to 'camera/common/1.0/default/CameraModule.cpp')
0 files changed, 0 insertions, 0 deletions