Loading media/libstagefright/omx/SimpleSoftOMXComponent.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -199,6 +199,13 @@ OMX_ERRORTYPE SimpleSoftOMXComponent::useBuffer( Mutex::Autolock autoLock(mLock); CHECK_LT(portIndex, mPorts.size()); PortInfo *port = &mPorts.editItemAt(portIndex); if (size < port->mDef.nBufferSize) { ALOGE("b/63522430, Buffer size is too small."); android_errorWriteLog(0x534e4554, "63522430"); return OMX_ErrorBadParameter; } *header = new OMX_BUFFERHEADERTYPE; (*header)->nSize = sizeof(OMX_BUFFERHEADERTYPE); (*header)->nVersion.s.nVersionMajor = 1; Loading @@ -221,8 +228,6 @@ OMX_ERRORTYPE SimpleSoftOMXComponent::useBuffer( (*header)->nOutputPortIndex = portIndex; (*header)->nInputPortIndex = portIndex; PortInfo *port = &mPorts.editItemAt(portIndex); CHECK(mState == OMX_StateLoaded || port->mDef.bEnabled == OMX_FALSE); CHECK_LT(port->mBuffers.size(), port->mDef.nBufferCountActual); Loading Loading
media/libstagefright/omx/SimpleSoftOMXComponent.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -199,6 +199,13 @@ OMX_ERRORTYPE SimpleSoftOMXComponent::useBuffer( Mutex::Autolock autoLock(mLock); CHECK_LT(portIndex, mPorts.size()); PortInfo *port = &mPorts.editItemAt(portIndex); if (size < port->mDef.nBufferSize) { ALOGE("b/63522430, Buffer size is too small."); android_errorWriteLog(0x534e4554, "63522430"); return OMX_ErrorBadParameter; } *header = new OMX_BUFFERHEADERTYPE; (*header)->nSize = sizeof(OMX_BUFFERHEADERTYPE); (*header)->nVersion.s.nVersionMajor = 1; Loading @@ -221,8 +228,6 @@ OMX_ERRORTYPE SimpleSoftOMXComponent::useBuffer( (*header)->nOutputPortIndex = portIndex; (*header)->nInputPortIndex = portIndex; PortInfo *port = &mPorts.editItemAt(portIndex); CHECK(mState == OMX_StateLoaded || port->mDef.bEnabled == OMX_FALSE); CHECK_LT(port->mBuffers.size(), port->mDef.nBufferCountActual); Loading