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

Commit c24deb62 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Don't allow using or allocating a buffer after the first state transition" into oc-dev

parents dab5aae9 81b554b0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1033,6 +1033,11 @@ status_t OMXNodeInstance::useBuffer(
    }

    Mutex::Autolock autoLock(mLock);
    if (!mSailed) {
        ALOGE("b/35467458");
        android_errorWriteLog(0x534e4554, "35467458");
        return BAD_VALUE;
    }

    switch (omxBuffer.mBufferType) {
        case OMXBuffer::kBufferTypePreset:
@@ -1470,6 +1475,11 @@ status_t OMXNodeInstance::allocateSecureBuffer(

    Mutex::Autolock autoLock(mLock);

    if (!mSailed) {
        ALOGE("b/35467458");
        android_errorWriteLog(0x534e4554, "35467458");
        return BAD_VALUE;
    }
    BufferMeta *buffer_meta = new BufferMeta(portIndex);

    OMX_BUFFERHEADERTYPE *header;