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

Skip to content
Commit fb3719ce authored by Keith Mok's avatar Keith Mok
Browse files

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
parent 9ea60c76
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