Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34b44cd7 authored by Kevin Rocard's avatar Kevin Rocard
Browse files

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: default avatarKevin Rocard <krocard@google.com>
parent d7e88525
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,