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

Commit a6aa8b25 authored by Avichal Rakesh's avatar Avichal Rakesh Committed by Automerger Merge Worker
Browse files

Merge "cameraservice: memcpy AIDL header instead of directly writing buffer"...

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

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



Change-Id: I08577642c3b7de861e1de87f90927913a330349b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 431c48f2 7795b0bd
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -379,9 +379,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;
}