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

Commit bd7a47f6 authored by Shuzhen Wang's avatar Shuzhen Wang Committed by Automerger Merge Worker
Browse files

Merge "Camera: memcpy Blob header rather than directly writing fields" into...

Merge "Camera: memcpy Blob header rather than directly writing fields" into tm-qpr-dev am: b68ae153

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/20621451



Change-Id: Ibfa497ff7918e5674a14ed077a3aff2ad26bb627
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5b1080a1 b68ae153
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1161,11 +1161,13 @@ status_t HeicCompositeStream::processCompletedInputFrame(int64_t frameNumber,
    inputFrame.fileFd = -1;

    // Fill in HEIC header
    uint8_t *header = static_cast<uint8_t*>(dstBuffer) + mMaxHeicBufferSize - sizeof(CameraBlob);
    CameraBlob *blobHeader = (CameraBlob *)header;
    // Must be in sync with CAMERA3_HEIC_BLOB_ID in android_media_Utils.cpp
    blobHeader->blobId = static_cast<CameraBlobId>(0x00FE);
    blobHeader->blobSizeBytes = fSize;
    uint8_t *header = static_cast<uint8_t*>(dstBuffer) + mMaxHeicBufferSize - sizeof(CameraBlob);
    CameraBlob blobHeader = {
        .blobId = static_cast<CameraBlobId>(0x00FE),
        .blobSizeBytes = static_cast<int32_t>(fSize)
    };
    memcpy(header, &blobHeader, sizeof(CameraBlob));

    res = native_window_set_buffers_timestamp(mOutputSurface.get(), inputFrame.timestamp);
    if (res != OK) {