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

Skip to content
Commit 6d8f3925 authored by Praveen Chavan's avatar Praveen Chavan Committed by Steve Kondik
Browse files

stagefright: yield callbackDispatcher to writer safely

Dispatcher acquires the OMXCodec instance (add ref) and
removes ref each time it dispatches a message. If removing
of ref is not guarded by the lock, based on timing,
dispatcher thread might be the last one to own OMXCodec and
ends up deleting OMXCodec instance from its own context.
Destruction of OMXCodec from dispatcher's context will also
freeNode, remove dispatcher, forcing dispatch-thread to join
itself.
On Android, this will not block itself, but may lead
to a race condition where [b] comes before [a].
[a] wait for the thread to finish (join)
[b] return from destructor (delete object memory)

CRs-Fixed: 647460
Change-Id: I651f55a74dc0444d6d8d87a55cc6d27556fbb9f5
parent 97f50613
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment