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
Loading
Please register or sign in to comment