Commit 6b1892fa authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

decoder: work around unlikely deadlock in input_DecoderWait()

ES output should probably not wait when there is no data... but it
does it at timest.
parent e17d14e3
......@@ -1417,11 +1417,14 @@ static void *DecoderThread( void *p_data )
decoder_owner_sys_t *p_owner = p_dec->p_owner;
/* The decoder's main loop */
vlc_mutex_lock( &p_owner->lock );
for( ;; )
{
block_t *p_block;
vlc_fifo_Lock( p_owner->p_fifo );
vlc_cond_signal( &p_owner->wait_acknowledge );
vlc_mutex_unlock( &p_owner->lock );
vlc_fifo_CleanupPush( p_owner->p_fifo );
vlc_cond_signal( &p_owner->wait_fifo );
......@@ -1457,11 +1460,9 @@ static void *DecoderThread( void *p_data )
}
p_owner->b_drained = (p_block == NULL);
vlc_cond_signal( &p_owner->wait_acknowledge );
vlc_mutex_unlock( &p_owner->lock );
vlc_restorecancel( canc );
}
return NULL;
vlc_assert_unreachable();
}
/**
......
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