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

Commit 55fd8fa3 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 am: bd7a47f6

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



Change-Id: I93560465ee9565347c5efe71e9d57eb771b5b9b0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents cac6dcaf bd7a47f6
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) {