Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bc600cb authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am f98197a7: Make sure the message dispatcher stays around until after...

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 'f98197a7' into gingerbread-plus-aosp

* commit '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.
parents 1fc97385 f98197a7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1443,6 +1443,8 @@ void OMXCodec::setComponentRole() {
}

OMXCodec::~OMXCodec() {
    mSource.clear();

    CHECK(mState == LOADED || mState == ERROR);

    status_t err = mOMX->freeNode(mNode);
+5 −3
Original line number Diff line number Diff line
@@ -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(