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

Commit f0547281 authored by Wonsik Kim's avatar Wonsik Kim Committed by android-build-merger
Browse files

omx: prevent input port enable/disable for software codecs am: 2b94fa82

am: c83b53c9

Change-Id: I6eeb301a2418cae6a57e49ed29527edd5e8de2b0
parents 1038762b c83b53c9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -469,6 +469,13 @@ void SimpleSoftOMXComponent::onPortEnable(OMX_U32 portIndex, bool enable) {
    CHECK_EQ((int)port->mTransition, (int)PortInfo::NONE);
    CHECK(port->mDef.bEnabled == !enable);

    if (port->mDef.eDir != OMX_DirOutput) {
        ALOGE("Port enable/disable allowed only on output ports.");
        notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
        android_errorWriteLog(0x534e4554, "29421804");
        return;
    }

    if (!enable) {
        port->mDef.bEnabled = OMX_FALSE;
        port->mTransition = PortInfo::DISABLING;