summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/OMX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/omx/OMX.cpp')
-rw-r--r--media/libstagefright/omx/OMX.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index 6de761f..c927da1 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -245,13 +245,15 @@ status_t OMX::freeNode(node_id node) {
CHECK(index >= 0);
mLiveNodes.removeItemsAt(index);
+ instance->observer()->asBinder()->unlinkToDeath(this);
+
+ status_t err = instance->freeNode(mMaster);
+
index = mDispatchers.indexOfKey(node);
CHECK(index >= 0);
mDispatchers.removeItemsAt(index);
- instance->observer()->asBinder()->unlinkToDeath(this);
-
- return instance->freeNode(mMaster);
+ return err;
}
status_t OMX::sendCommand(