Commit 650b219b authored by Martin Storsjö's avatar Martin Storsjö Committed by Jean-Baptiste Kempf

omxil: Handle sentinel buffers in DecodeAudio, too

These buffers were introduced to avoid a potential deadlock
when the codec has issued a PortSettingsChanged event but
not returned any buffers to the client, making the DecodeVideo
function hang waiting for an input buffer to use, before
handling the reconfigure. The same handling needs to be done
for DecodeAudio too, otherwise it will try to use the
sentinel buffer as a normal one.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 74b8075f417f3a9b92a43ae7c97973b2719a225c)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 819310ff
......@@ -1372,6 +1372,10 @@ aout_buffer_t *DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
/* Send the input buffer to the component */
OMX_FIFO_GET(&p_sys->in.fifo, p_header);
if (p_header && p_header->nFlags & OMX_BUFFERFLAG_EOS)
goto reconfig;
if(p_header)
{
p_header->nFilledLen = p_block->i_buffer;
......@@ -1408,6 +1412,7 @@ aout_buffer_t *DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
*pp_block = NULL; /* Avoid being fed the same packet again */
}
reconfig:
/* Handle the PortSettingsChanged events */
for(i = 0; i < p_sys->ports; i++)
{
......
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