From 04906863a1fa7f296ac11f07e62aa688da39c3ad Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Thu, 9 Oct 2014 09:47:12 -0700 Subject: Fix VideoFrame class layout for 64/32 bit This structure is passed between 64 and 32 bit processes via shared memory, so ensure it's the same size, and that the members we care about are in the same place. Bug: 17569156 Change-Id: Id776bc825af1fbf43a6dd3407cca064f6d932902 --- include/private/media/VideoFrame.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/private') diff --git a/include/private/media/VideoFrame.h b/include/private/media/VideoFrame.h index 5dd425b..5193d00 100644 --- a/include/private/media/VideoFrame.h +++ b/include/private/media/VideoFrame.h @@ -63,8 +63,11 @@ public: uint32_t mDisplayWidth; uint32_t mDisplayHeight; uint32_t mSize; // Number of bytes in mData + int32_t mRotationAngle; // rotation angle, clockwise, should be multiple of 90 + // mData should be 64 bit aligned to prevent additional padding uint8_t* mData; // Actual binary data - int32_t mRotationAngle; // rotation angle, clockwise + // pad structure so it's the same size on 64 bit and 32 bit + char mPadding[8 - sizeof(mData)]; }; }; // namespace android -- cgit v1.1