stagefright: Fix cts testGetMaxSupportedInstances
Fix cts testGetMaxSupportedInstances on 64 bits system.
In FFMPEGSoftCodec.cpp, it tries to get OMX parameter
in function setRawAudioFormat by calling:
OMX_PARAM_PORTDEFINITIONTYPE def;
...
status_t err = OMXhandle->getParameter(
nodeID, OMX_IndexParamPortDefinition, &def, sizeof(def));
However, this code runs in 64 bits, and mediaserver is running in 32 bits.
sizeof(OMX_PARAM_PORTDEFINITIONTYPE) is equals to 112 vs 96 in 32 bits mode,
since sizeof(OMX_PTR) are different.
In SimpleSoftOMXComponent::internalGetParameter which runs in 32 bits mode,
it checks defParams->nSize != sizeof(OMX_PARAM_PORTDEFINITIONTYPE)
and fails.
Declaring OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS in
FFMPEGSoftCodec.cpp solves it.
Change-Id: Ieb5a548c580e87c964c66f0b0d6ce8bb14dac690
Loading
Please register or sign in to comment