From f75a2aebde60259e6a1c7c88112cdcce8a770da2 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Tue, 16 May 2017 10:29:50 -0700 Subject: [PATCH] Don't CHECK on illegal state change Bug: 36075139 Change-Id: If399c1cb83a6cf79f0e52353dce9d8142e7728c6 --- media/libstagefright/omx/SimpleSoftOMXComponent.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp index 761b42505b..a0b940d918 100644 --- a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp +++ b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp @@ -454,7 +454,12 @@ void SimpleSoftOMXComponent::onChangeState(OMX_STATETYPE state) { state = OMX_StateLoaded; } - CHECK_EQ((int)mState, (int)mTargetState); + if (mState != mTargetState) { + ALOGE("State change to state %d requested while still transitioning from state %d to %d", + state, mState, mTargetState); + notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL); + return; + } switch (mState) { case OMX_StateLoaded: