vlc | branch: master | Martin Storsjö <[email protected]> | 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ö <[email protected]>

> 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, &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++)
     {

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to