Commit 4832631e authored by Laurent Aimar's avatar Laurent Aimar

Fixed a potential deadlock.

parent e5ed591a
......@@ -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 )
{
......
......@@ -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 ) ))
......
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