Commit 6643ac0a authored by Martin Storsjö's avatar Martin Storsjö Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 74b8075f
......@@ -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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment