From eec06d3679db96ec41a017d542c878f3b7070b0e Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 6 Jan 2011 10:26:36 -0800 Subject: [PATCH] If we failed to initialize the codec after transitioning to IDLE state, don't assert during shutdown. Change-Id: I40ac44260fb136c15d6dcb9f5ad62211640c66ec related-to-bug: 3328222 --- media/libstagefright/OMXCodec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index f63774a672cfe..8efd963ea7235 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -1506,7 +1506,7 @@ void OMXCodec::setComponentRole() { OMXCodec::~OMXCodec() { mSource.clear(); - CHECK(mState == LOADED || mState == ERROR); + CHECK(mState == LOADED || mState == ERROR || mState == LOADED_TO_IDLE); status_t err = mOMX->freeNode(mNode); CHECK_EQ(err, (status_t)OK);