[vlc-devel] commit: Fixed a potential deadlock. (Laurent Aimar )
git version control
git at videolan.org
Thu Oct 9 00:14:26 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Oct 8 21:38:55 2008 +0200| [4832631e51f377fc2babf32b59965873763d1f4f] | committer: Laurent Aimar
Fixed a potential deadlock.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4832631e51f377fc2babf32b59965873763d1f4f
---
src/input/decoder.c | 4 ++--
src/input/es_out.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 41f79b0..b63d26c 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -394,8 +394,8 @@ void input_DecoderDecode( decoder_t * p_dec, block_t *p_block )
bool input_DecoderIsEmpty( decoder_t * p_dec )
{
- /* FIXME it is buggy if the decoder is buffering FIXME
- * -> "deadlock" */
+ assert( !p_dec->p_owner->b_buffering );
+
if( p_dec->p_owner->b_own_thread &&
block_FifoCount( p_dec->p_owner->p_fifo ) > 0 )
{
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 4c6573b..a078323 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1737,7 +1737,7 @@ static void EsOutDel( es_out_t *out, es_out_id_t *es )
/* We don't try to reselect */
if( es->p_dec )
{
- while( !out->p_sys->p_input->b_die && es->p_dec )
+ while( !p_sys->p_input->b_die && !p_sys->b_buffering && es->p_dec )
{
if( input_DecoderIsEmpty( es->p_dec ) &&
( !es->p_dec_record || input_DecoderIsEmpty( es->p_dec_record ) ))
More information about the vlc-devel
mailing list