[vlc-commits] omxil: Handle sentinel buffers in DecodeAudio, too
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:03 2011 +0200| [74b8075f417f3a9b92a43ae7c97973b2719a225c] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74b8075f417f3a9b92a43ae7c97973b2719a225c
---
modules/codec/omxil/omxil.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 92f2be7..7be3ec6 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -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++)
{
More information about the vlc-commits
mailing list