Skip to content

Commit

Permalink
Fixed a potential deadlock.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Aimar committed Oct 8, 2008
1 parent e5ed591 commit 4832631
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/input/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/input/es_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ))
Expand Down

0 comments on commit 4832631

Please sign in to comment.