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: Martin Storsjö <martin@martin.st>
OMX_INIT_STRUCTURE(definition);
omx_error = OMX_GetParameter(omx_handle, p_dec->fmt_in.i_cat == VIDEO_ES ?
OMX_IndexParamVideoInit : OMX_IndexParamAudioInit, ¶m);
- 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++)
{