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

Skip to content
Commit 5480b212 authored by Jessie Hao's avatar Jessie Hao
Browse files

fix validateBufferDescriptorInfo error when usage bits were 32-bits



When usage bits were 32-bits, and the bit 31 is 1, will meet the below error:
E Gralloc4: buffer descriptor contains invalid usage bits 0xffff00000000
E GraphicBufferMapper: validateBufferSize(0xb400007adcd71320) failed: 1

android_native_buffer_t define usage_deprecated as int.
For example usage_deprecated is 0x80000000,
uint64_t(0x80000000) will cast to 0xffffffff80000000, which leads to
validateBufferDescriptorInfo fail.

Add ANDROID_NATIVE_UNSIGNED_CAST(usage_deprecated) to fix this.

Test:
CtsMediaRecorderTestCases
android.media.recorder.cts.MediaRecorderTest#testProfileAvcBaselineLevel1

Bug: b/244620240
Signed-off-by: default avatarJessie Hao <juan.hao@nxp.com>
Change-Id: I131b9dee3b2b768729218d8f7cabe0026ab89007
parent 84d5709e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment