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

Commit fe3572ad authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

libstagefright: Don't set a global ERROR state for same-state changes

Changing from a state to itself is fairly harmless, and propagating
this as a global mState was breaking the rest of the state-change chain,
resulting in decoder crashes on qcom/qdsp5

Change-Id: Ib5380ada1f226fc7a631e7beb16308dbceb2fd74
parent 13385b5e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1981,6 +1981,10 @@ void OMXCodec::onEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) {

        case OMX_EventError:
        {
            if (data1 && (OMX_S32)data1 == OMX_ErrorSameState) {
                /* Don't raise fatal errors for samestate changes */
                break;
            }
            CODEC_LOGE("ERROR(0x%08lx, %ld)", data1, data2);

            setState(ERROR);