summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-07-07 08:20:49 -0700
committerAndreas Huber <andih@google.com>2010-07-07 08:20:49 -0700
commitf0128187491b4d65b9c2620d46f5af807f63d728 (patch)
tree6c34c71ba435985300f40e59eccb30980db1fcfd /media/libstagefright/omx
parent3ecb233c9c121af3e68ece11705043b1dbef505b (diff)
downloadframeworks_av-f0128187491b4d65b9c2620d46f5af807f63d728.zip
frameworks_av-f0128187491b4d65b9c2620d46f5af807f63d728.tar.gz
frameworks_av-f0128187491b4d65b9c2620d46f5af807f63d728.tar.bz2
Make sure the OMX callback thread is properly shutdown after the node goes away.
Change-Id: Ib0b25855b0dfc191e5529193b4cb519f644a8412
Diffstat (limited to 'media/libstagefright/omx')
-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 ad5b0f9..6de761f 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);