[vlc-devel] [PATCH 6/6] omxil: Don't free the sentinel buffers
Martin Storsjö
martin at martin.st
Mon Dec 19 16:03:04 CET 2011
These buffers aren't known to the actual OMX codec.
Normally, these buffers are removed from the queue by
DecodeAudio/DecodeVideo, but if they're pushed multiple
times (which happens when using google sw decoders),
PortReconfigure might try to free them.
---
modules/codec/omxil/omxil.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 7be3ec6..ef8982b 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -580,6 +580,8 @@ static OMX_ERRORTYPE DeinitialiseComponent(decoder_t *p_dec,
for(j = 0; j < p_port->i_buffers; j++)
{
OMX_FIFO_GET(&p_port->fifo, p_buffer);
+ if (p_buffer == &p_sys->sentinel_buffer)
+ continue;
omx_error = OMX_FreeBuffer( omx_handle,
p_port->i_port_index, p_buffer );
@@ -1048,6 +1050,8 @@ static OMX_ERRORTYPE PortReconfigure(decoder_t *p_dec, OmxPort *p_port)
for(i = 0; i < p_port->i_buffers; i++)
{
OMX_FIFO_GET(&p_port->fifo, p_buffer);
+ if (p_buffer == &p_sys->sentinel_buffer)
+ continue;
omx_error = OMX_FreeBuffer( p_sys->omx_handle,
p_port->i_port_index, p_buffer );
--
1.7.2.5
More information about the vlc-devel
mailing list