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

Commit b3f0ddab authored by Avichal Rakesh's avatar Avichal Rakesh Committed by Android (Google) Code Review
Browse files

Merge "cameraservice: memcpy AIDL header instead of directly writing buffer" into tm-dev

parents ad44d135 51af070e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -375,9 +375,11 @@ status_t Camera3OutputStream::fixUpHidlJpegBlobHeader(ANativeWindowBuffer* anwBu
    }

    // Fill in JPEG header
    CameraBlob *aidlBlobHeader = reinterpret_cast<CameraBlob *>(aidlHeaderStart);
    aidlBlobHeader->blobId = blobId;
    aidlBlobHeader->blobSizeBytes = blobSizeBytes;
    CameraBlob aidlHeader = {
            .blobId = blobId,
            .blobSizeBytes = static_cast<int32_t>(blobSizeBytes)
    };
    memcpy(aidlHeaderStart, &aidlHeader, sizeof(CameraBlob));
    graphicBuffer->unlock();
    return OK;
}