[vlc-devel] [PATCH 6/9] omxil: Use larger buffers on the OMAP4 decoder

Martin Storsjö martin at martin.st
Wed Apr 4 14:17:57 CEST 2012


This makes buffer allocation not fail.
---
 modules/codec/omxil/omxil.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 5638232..9d6a738 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -413,6 +413,15 @@ static OMX_ERRORTYPE SetPortDefinition(decoder_t *p_dec, OmxPort *p_port,
         CHECK_ERROR(omx_error, "SetAudioParameters failed (%x : %s)",
                     omx_error, ErrorToString(omx_error));
     }
+    if (!strcmp(p_dec->p_sys->psz_component, "OMX.TI.DUCATI1.VIDEO.DECODER") &&
+                def->eDir == OMX_DirOutput)
+    {
+        /* When setting the output buffer size above, the decoder actually
+         * sets the buffer size to a lower value than what was chosen. If
+         * we try to allocate buffers of this size, it fails. Thus, forcibly
+         * use a larger buffer size. */
+        def->nBufferSize *= 2;
+    }
 
  error:
     return omx_error;
-- 
1.7.2.5




More information about the vlc-devel mailing list