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

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

am ff119e74: am 6615defd: Make sure the OMX callback thread is properly...

am ff119e74: am 6615defd: Make sure the OMX callback thread is properly shutdown after the node goes away.

Merge commit 'ff119e74'

* commit 'ff119e74':
  Make sure the OMX callback thread is properly shutdown after the node goes away.
parents 0bad0c4c ff119e74
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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);