[vlc-devel] [PATCH 05/21] Update the number of buffers when reconfiguring
Martin Storsjo
martin at martin.st
Sun Sep 4 14:54:10 CEST 2011
From: Martin Storsjö <martin at martin.st>
On OpenMAX devices supported earlier, the number of buffers has
stayed the same after reconfiguring, but on the Nexus One, the
number changes.
This is a generic bug fix for the omxil module and can
be applied to the main tree immediately.
---
modules/codec/omxil/omxil.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 71b1716..f399f63 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -992,6 +992,9 @@ static OMX_ERRORTYPE PortReconfigure(decoder_t *p_dec, OmxPort *p_port)
CHECK_ERROR(omx_error, "ONX_CommandPortEnable on %i failed (%x)",
(int)p_port->i_port_index, omx_error );
+ if (p_port->definition.nBufferCountActual > p_port->i_buffers)
+ p_port->pp_buffers = realloc(p_port->pp_buffers, p_port->definition.nBufferCountActual * sizeof(OMX_BUFFERHEADERTYPE*));
+ p_port->i_buffers = p_port->definition.nBufferCountActual;
for(i = 0; i < p_port->i_buffers; i++)
{
if(0 && p_port->b_direct)
--
1.7.2.5
More information about the vlc-devel
mailing list