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

Commit 032ecb7f authored by Narayan Kamath's avatar Narayan Kamath Committed by Gerrit Code Review
Browse files

Merge "Fix in SoftAVCEncoder plugin"

parents 45d2c7e1 9af4f002
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -819,9 +819,10 @@ void SoftAVCEncoder::onQueueFilled(OMX_U32 portIndex) {
                videoInput.coding_timestamp = (inHeader->nTimeStamp + 500) / 1000;  // in ms
                uint8_t *inputData = NULL;
                if (mStoreMetaDataInBuffers) {
                    if (inHeader->nFilledLen != 8) {
                    if (inHeader->nFilledLen != (sizeof(OMX_U32) + sizeof(buffer_handle_t))) {
                        ALOGE("MetaData buffer is wrong size! "
                                "(got %u bytes, expected 8)", inHeader->nFilledLen);
                                "(got %u bytes, expected %d)", inHeader->nFilledLen,
                                  sizeof(OMX_U32) + sizeof(buffer_handle_t));
                        mSignalledError = true;
                        notify(OMX_EventError, OMX_ErrorUndefined, 0, 0);
                        return;
@@ -985,7 +986,7 @@ uint8_t *SoftAVCEncoder::extractGrallocData(void *data, buffer_handle_t *buffer)
                kMetadataBufferTypeGrallocSource, type);
        return NULL;
    }
    buffer_handle_t imgBuffer = *(buffer_handle_t*)((uint8_t*)data + 4);
    buffer_handle_t imgBuffer = *(buffer_handle_t*)((uint8_t*)data + sizeof(OMX_U32));

    const Rect rect(mVideoWidth, mVideoHeight);
    uint8_t *img;