summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Huber <andih@google.com> 2010-07-07 09:43:18 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2010-07-07 09:43:18 -0700
commita87843704107d6da82fa64bcab2635a2cacad8b4 (patch)
tree20db3da87ca23a049803e68e16222512156b5c25
parent0bad0c4c87ee6d3dd9bec108d56e445dcfba57da (diff)
parentff119e746afe834040afb1631caee355d94237e8 (diff)
am ff119e74: am 6615defd: Make sure the OMX callback thread is properly shutdown after the node goes away.
Merge commit 'ff119e746afe834040afb1631caee355d94237e8' * commit 'ff119e746afe834040afb1631caee355d94237e8': Make sure the OMX callback thread is properly shutdown after the node goes away.
-rw-r--r--media/libstagefright/omx/OMX.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index ad5b0f9c15e0..6de761f06fe9 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -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);