diff options
author | Andreas Huber <andih@google.com> | 2012-05-01 10:25:01 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-05-01 10:25:01 -0700 |
commit | b78ff5fb6f56c679bce936078180ce61a1e97288 (patch) | |
tree | 159fcb38ec3e57b0e0671273ba50c1f5862445ae /media/libstagefright/omx/OMX.cpp | |
parent | 27431de020e535c31365884316f656bc60b4fe4f (diff) | |
download | frameworks_av-b78ff5fb6f56c679bce936078180ce61a1e97288.zip frameworks_av-b78ff5fb6f56c679bce936078180ce61a1e97288.tar.gz frameworks_av-b78ff5fb6f56c679bce936078180ce61a1e97288.tar.bz2 |
Fix assertion triggered when mediaserver dies at roughly the same
time that a client attempts to explicitly free an OMX node.
Change-Id: I767e6af402801357da20b328611cc7cddeed0260
related-to-bug: 6012750
Diffstat (limited to 'media/libstagefright/omx/OMX.cpp')
-rw-r--r-- | media/libstagefright/omx/OMX.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp index f11fcd2..681e321 100644 --- a/media/libstagefright/omx/OMX.cpp +++ b/media/libstagefright/omx/OMX.cpp @@ -253,7 +253,11 @@ status_t OMX::freeNode(node_id node) { OMXNodeInstance *instance = findInstance(node); ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder()); - CHECK(index >= 0); + if (index < 0) { + // This could conceivably happen if the observer dies at roughly the + // same time that a client attempts to free the node explicitly. + return OK; + } mLiveNodes.removeItemsAt(index); instance->observer()->asBinder()->unlinkToDeath(this); |