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

Commit 85da44b7 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android Git Automerger
Browse files

am b6b97f60: am eb76f318: am 96aed4fb: Merge "avcenc: Prepend startcodes to output buffers"

* commit 'b6b97f60':
  avcenc: Prepend startcodes to output buffers
parents 1fc6cb5b b6b97f60
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -871,7 +871,13 @@ void SoftAVCEncoder::onQueueFilled(OMX_U32 portIndex) {
        CHECK(encoderStatus == AVCENC_SUCCESS || encoderStatus == AVCENC_NEW_IDR);
        dataLength = outHeader->nAllocLen;  // Reset the output buffer length
        if (inHeader->nFilledLen > 0) {
            if (outHeader->nAllocLen >= 4) {
                memcpy(outPtr, "\x00\x00\x00\x01", 4);
                outPtr += 4;
                dataLength -= 4;
            }
            encoderStatus = PVAVCEncodeNAL(mHandle, outPtr, &dataLength, &type);
            dataLength = outPtr + dataLength - outHeader->pBuffer;
            if (encoderStatus == AVCENC_SUCCESS) {
                CHECK(NULL == PVAVCEncGetOverrunBuffer(mHandle));
            } else if (encoderStatus == AVCENC_PICTURE_READY) {