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

decoder: reduce lock scope, remove stray signal

parent d2bb4d1b
......@@ -2127,20 +2127,18 @@ void input_DecoderWait( decoder_t *p_dec )
assert( p_owner->b_waiting );
vlc_mutex_lock( &p_owner->lock );
vlc_fifo_Lock( p_owner->p_fifo );
while( !p_owner->b_has_data )
{
vlc_fifo_Lock( p_owner->p_fifo );
if( p_owner->b_idle && vlc_fifo_IsEmpty( p_owner->p_fifo ) )
{
msg_Warn( p_dec, "can't wait without data to decode" );
vlc_fifo_Unlock( p_owner->p_fifo );
break;
}
vlc_fifo_Signal( p_owner->p_fifo );
vlc_fifo_Unlock( p_owner->p_fifo );
vlc_cond_wait( &p_owner->wait_acknowledge, &p_owner->lock );
vlc_fifo_Lock( p_owner->p_fifo );
}
vlc_fifo_Unlock( p_owner->p_fifo );
vlc_mutex_unlock( &p_owner->lock );
}
......
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