[vlc-commits] omxil: Don't free the sentinel buffers
Martin Storsjö
git at videolan.org
Mon Dec 19 21:54:07 CET 2011
vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Dec 19 17:03:04 2011 +0200| [6643ac0ae02a61c95b3911b1c36856ace0d06b2e] | committer: Jean-Baptiste Kempf
omxil: Don't free the sentinel buffers
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.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6643ac0ae02a61c95b3911b1c36856ace0d06b2e
---
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 );
More information about the vlc-commits
mailing list