diff options
author | Kevin Rocard <krocard@google.com> | 2017-04-19 09:32:21 -0700 |
---|---|---|
committer | Kevin Rocard <krocard@google.com> | 2017-04-19 09:38:42 -0700 |
commit | 34b44cd7dba0ae9bd7c51fdb3677a7a28741fc1e (patch) | |
tree | f63ff23c46645ae568b2f1c61c2b909bd97d9a5e | |
parent | d7e88525a772c001ea24f9250949ef6ac32b59b7 (diff) |
Audio primary hal: fix member function used before init
prepare for write was refactor by Ib4170eb6a9f88f9352d0912083b43d600771bb8e
to use temporary variable in a rai pattern.
Nevertheless the member variable was still used too early in
prepareForRead resulting in a crash for capture.
Test: assistant, camcorder
Bug: 37492059
Change-Id: I08140834959c440798cd40700dd089adca2f3e40
Signed-off-by: Kevin Rocard <krocard@google.com>
-rw-r--r-- | audio/2.0/default/StreamIn.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp index 0798bbea9d..e5a1a55524 100644 --- a/audio/2.0/default/StreamIn.cpp +++ b/audio/2.0/default/StreamIn.cpp @@ -354,7 +354,7 @@ Return<void> StreamIn::prepareForReading( CommandMQ::Descriptor(), DataMQ::Descriptor(), StatusMQ::Descriptor(), threadInfo); return Void(); } - status = mReadThread->run("reader", PRIORITY_URGENT_AUDIO); + status = tempReadThread->run("reader", PRIORITY_URGENT_AUDIO); if (status != OK) { ALOGW("failed to start reader thread: %s", strerror(-status)); _hidl_cb(Result::INVALID_ARGUMENTS, |