[vlc-commits] omxil: If OMX_IndexParamVideoInit failed, assume 2 ports with index 0 and 1
Martin Storsjö
git at videolan.org
Sat Feb 2 15:13:57 CET 2013
vlc | branch: master | Martin Storsjö <martin at martin.st> | Sat Dec 3 23:46:04 2011 +0200| [49362976f0f9dbe9e4b3968bee698f34e2a4cda5] | committer: 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: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=49362976f0f9dbe9e4b3968bee698f34e2a4cda5
---
modules/codec/omxil/omxil.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index b0d423b..b398680 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -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, ¶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++)
{
More information about the vlc-commits
mailing list