Make sure the OMX callback thread is properly shutdown after the node goes away.
Change-Id: Ib0b25855b0dfc191e5529193b4cb519f644a8412
This commit is contained in:
@@ -164,6 +164,10 @@ void OMX::binderDied(const wp<IBinder> &the_late_who) {
|
|||||||
instance = mLiveNodes.editValueAt(index);
|
instance = mLiveNodes.editValueAt(index);
|
||||||
mLiveNodes.removeItemsAt(index);
|
mLiveNodes.removeItemsAt(index);
|
||||||
|
|
||||||
|
index = mDispatchers.indexOfKey(instance->nodeID());
|
||||||
|
CHECK(index >= 0);
|
||||||
|
mDispatchers.removeItemsAt(index);
|
||||||
|
|
||||||
invalidateNodeID_l(instance->nodeID());
|
invalidateNodeID_l(instance->nodeID());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,6 +244,11 @@ status_t OMX::freeNode(node_id node) {
|
|||||||
ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
|
ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
|
||||||
CHECK(index >= 0);
|
CHECK(index >= 0);
|
||||||
mLiveNodes.removeItemsAt(index);
|
mLiveNodes.removeItemsAt(index);
|
||||||
|
|
||||||
|
index = mDispatchers.indexOfKey(node);
|
||||||
|
CHECK(index >= 0);
|
||||||
|
mDispatchers.removeItemsAt(index);
|
||||||
|
|
||||||
instance->observer()->asBinder()->unlinkToDeath(this);
|
instance->observer()->asBinder()->unlinkToDeath(this);
|
||||||
|
|
||||||
return instance->freeNode(mMaster);
|
return instance->freeNode(mMaster);
|
||||||
|
|||||||
Reference in New Issue
Block a user