am f98197a7: Make sure the message dispatcher stays around until after OMX_FreeHandle is finished in case it posts some more messages during shutdown. Clear the source as soon as possible in OMXCodec\'s destructor.
Merge commit 'f98197a7274c2d7da647f52b3d8b0c74492139af' into gingerbread-plus-aosp * commit 'f98197a7274c2d7da647f52b3d8b0c74492139af': Make sure the message dispatcher stays around until after OMX_FreeHandle is finished in case it posts some more messages during shutdown. Clear the source as soon as possible in OMXCodec's destructor.
This commit is contained in:
@@ -1443,6 +1443,8 @@ void OMXCodec::setComponentRole() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
OMXCodec::~OMXCodec() {
|
OMXCodec::~OMXCodec() {
|
||||||
|
mSource.clear();
|
||||||
|
|
||||||
CHECK(mState == LOADED || mState == ERROR);
|
CHECK(mState == LOADED || mState == ERROR);
|
||||||
|
|
||||||
status_t err = mOMX->freeNode(mNode);
|
status_t err = mOMX->freeNode(mNode);
|
||||||
|
|||||||
@@ -245,13 +245,15 @@ status_t OMX::freeNode(node_id node) {
|
|||||||
CHECK(index >= 0);
|
CHECK(index >= 0);
|
||||||
mLiveNodes.removeItemsAt(index);
|
mLiveNodes.removeItemsAt(index);
|
||||||
|
|
||||||
|
instance->observer()->asBinder()->unlinkToDeath(this);
|
||||||
|
|
||||||
|
status_t err = instance->freeNode(mMaster);
|
||||||
|
|
||||||
index = mDispatchers.indexOfKey(node);
|
index = mDispatchers.indexOfKey(node);
|
||||||
CHECK(index >= 0);
|
CHECK(index >= 0);
|
||||||
mDispatchers.removeItemsAt(index);
|
mDispatchers.removeItemsAt(index);
|
||||||
|
|
||||||
instance->observer()->asBinder()->unlinkToDeath(this);
|
return err;
|
||||||
|
|
||||||
return instance->freeNode(mMaster);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t OMX::sendCommand(
|
status_t OMX::sendCommand(
|
||||||
|
|||||||
Reference in New Issue
Block a user