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

Commit 7a2d8f92 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

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



Change-Id: I7beede6c7548d7f5d3b259f459974ac05599f265
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0e6ca486 b3f0ddab
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;
}