[vlc-commits] omxil: Use larger buffers on the OMAP4 decoder
Martin Storsjö
git at videolan.org
Wed Apr 4 15:08:29 CEST 2012
vlc | branch: master | Martin Storsjö <martin at martin.st> | Wed Apr 4 15:17:57 2012 +0300| [0ce57ba0106a73f1f80b52445aee0efd7a5a9170] | committer: Jean-Baptiste Kempf
omxil: Use larger buffers on the OMAP4 decoder
This makes buffer allocation not fail.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ce57ba0106a73f1f80b52445aee0efd7a5a9170
---
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;
More information about the vlc-commits
mailing list