Commit 49362976 authored by Martin Storsjö's avatar Martin Storsjö

omxil: If OMX_IndexParamVideoInit failed, assume 2 ports with index 0 and 1

This is required to use the OMX.google.* sw decoder components
(which are useful for testing).

Only do this workaround on android builds for now, to limit the
scope of the hack.
Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent fab34784
......@@ -754,7 +754,14 @@ static OMX_ERRORTYPE InitialiseComponent(decoder_t *p_dec,
OMX_INIT_STRUCTURE(definition);
omx_error = OMX_GetParameter(omx_handle, p_dec->fmt_in.i_cat == VIDEO_ES ?
OMX_IndexParamVideoInit : OMX_IndexParamAudioInit, &param);
if(omx_error != OMX_ErrorNone) param.nPorts = 0;
if(omx_error != OMX_ErrorNone) {
#ifdef __ANDROID__
param.nPorts = 2;
param.nStartPortNumber = 0;
#else
param.nPorts = 0;
#endif
}
for(i = 0; i < param.nPorts; i++)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment