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

Commit 5e184b0d authored by Lajos Molnar's avatar Lajos Molnar
Browse files

ACodec: ignore OMX messages to already freed component

Bug: 12916984
Change-Id: I92848797b8d556cff468b9b0f0a618946083208f
parent b47558f8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3103,6 +3103,14 @@ bool ACodec::BaseState::onOMXMessage(const sp<AMessage> &msg) {
    int32_t type;
    CHECK(msg->findInt32("type", &type));

    // there is a possibility that this is an outstanding message for a
    // codec that we have already destroyed
    if (mCodec->mNode == NULL) {
        ALOGI("ignoring message as already freed component: %s",
                msg->debugString().c_str());
        return true;
    }

    IOMX::node_id nodeID;
    CHECK(msg->findPointer("node", &nodeID));
    CHECK_EQ(nodeID, mCodec->mNode);