diff options
author | Andreas Huber <andih@google.com> | 2010-07-07 08:20:49 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-07-07 08:20:49 -0700 |
commit | 6615defd4b8ae627e7f0bbb2382c4d86481f76bd (patch) | |
tree | ae53db5bb3d101b209b377db7a82fd12c47c113c /media/libstagefright/omx | |
parent | 9406f626b2d8f64a084d41f6ea379e539b162a55 (diff) | |
download | frameworks_base-6615defd4b8ae627e7f0bbb2382c4d86481f76bd.zip frameworks_base-6615defd4b8ae627e7f0bbb2382c4d86481f76bd.tar.gz frameworks_base-6615defd4b8ae627e7f0bbb2382c4d86481f76bd.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.cpp | 9 |
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); |