Skip to content

opensles: prevent crash in releaseBuffer()#863

Merged
philburk merged 1 commit intomasterfrom
workaroundsles
May 20, 2020
Merged

opensles: prevent crash in releaseBuffer()#863
philburk merged 1 commit intomasterfrom
workaroundsles

Conversation

@philburk
Copy link
Copy Markdown
Contributor

Move call to getPosition() outside the callback.
This was triggering a restoreTrack_l() inside
AudioFlinger folowing a headset insertion.
That in turn caused an assert in releaseBuffer() in
AudioTrack or AudioRecord.

Now it is called when needed by getFramesRead() or getFramesWritten().

Fixes ##535

Move call to getPosition() outside the callback.
This was triggering a restoreTrack_l() inside
AudioFlinger folowing a headset insertion.
That in turn caused an assert in releaseBuffer() in
AudioTrack or AudioRecord.

Now it is called when needed by getFramesRead() or getFramesWritten().

Fixes ##535
@philburk philburk requested a review from dturner May 20, 2020 22:14
@philburk philburk merged commit d2430bf into master May 20, 2020
@philburk philburk deleted the workaroundsles branch May 20, 2020 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant