am 6615defd: Make sure the OMX callback thread is properly shutdown after the node goes away.

Merge commit '6615defd4b8ae627e7f0bbb2382c4d86481f76bd' into gingerbread-plus-aosp

* commit '6615defd4b8ae627e7f0bbb2382c4d86481f76bd':
  Make sure the OMX callback thread is properly shutdown after the node goes away.
This commit is contained in:
Andreas Huber
2010-07-07 09:40:58 -07:00
committed by Android Git Automerger

View File

@@ -164,6 +164,10 @@ void OMX::binderDied(const wp<IBinder> &the_late_who) {
instance = mLiveNodes.editValueAt(index);
mLiveNodes.removeItemsAt(index);
index = mDispatchers.indexOfKey(instance->nodeID());
CHECK(index >= 0);
mDispatchers.removeItemsAt(index);
invalidateNodeID_l(instance->nodeID());
}
@@ -240,6 +244,11 @@ status_t OMX::freeNode(node_id node) {
ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
CHECK(index >= 0);
mLiveNodes.removeItemsAt(index);
index = mDispatchers.indexOfKey(node);
CHECK(index >= 0);
mDispatchers.removeItemsAt(index);
instance->observer()->asBinder()->unlinkToDeath(this);
return instance->freeNode(mMaster);