diff options
author | Lajos Molnar <lajos@google.com> | 2014-03-28 14:37:51 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-03-28 14:37:51 -0700 |
commit | 5e184b0d12f1ec436246a391da8d9355cc21ee08 (patch) | |
tree | 65fee93841a06248c237e858678166d7aa66f55a | |
parent | b47558f87ee9bd4fce11a2d5bc213bd1aa9031a8 (diff) | |
download | frameworks_av-5e184b0d12f1ec436246a391da8d9355cc21ee08.zip frameworks_av-5e184b0d12f1ec436246a391da8d9355cc21ee08.tar.gz frameworks_av-5e184b0d12f1ec436246a391da8d9355cc21ee08.tar.bz2 |
ACodec: ignore OMX messages to already freed component
Bug: 12916984
Change-Id: I92848797b8d556cff468b9b0f0a618946083208f
-rw-r--r-- | media/libstagefright/ACodec.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 9164e5c..ac40568 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -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); |