summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2014-10-09 09:47:12 -0700
committerMarco Nelissen <marcone@google.com>2014-10-09 09:47:12 -0700
commit04906863a1fa7f296ac11f07e62aa688da39c3ad (patch)
tree920f274f1058dafcdc3a0c6a4772eba868f09be4
parentaf1a4dc989d6707116eaefab300ad55124aace66 (diff)
downloadframeworks_av-04906863a1fa7f296ac11f07e62aa688da39c3ad.zip
frameworks_av-04906863a1fa7f296ac11f07e62aa688da39c3ad.tar.gz
frameworks_av-04906863a1fa7f296ac11f07e62aa688da39c3ad.tar.bz2
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
-rw-r--r--include/private/media/VideoFrame.h5
1 files changed, 4 insertions, 1 deletions
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