Commit 8e7440d5 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

decoder: simplify cond_wait loop condition

We generally see cond_wait surrounded by a while loop.
parent 09fbe460
...@@ -813,12 +813,8 @@ static void DecoderWaitUnblock( vlc_input_decoder_t *p_owner ) ...@@ -813,12 +813,8 @@ static void DecoderWaitUnblock( vlc_input_decoder_t *p_owner )
{ {
vlc_mutex_assert( &p_owner->lock ); vlc_mutex_assert( &p_owner->lock );
for( ;; ) while( p_owner->b_waiting && p_owner->b_has_data )
{
if( !p_owner->b_waiting || !p_owner->b_has_data )
break;
vlc_cond_wait( &p_owner->wait_request, &p_owner->lock ); vlc_cond_wait( &p_owner->wait_request, &p_owner->lock );
}
} }
static inline void DecoderUpdatePreroll( vlc_tick_t *pi_preroll, const block_t *p ) static inline void DecoderUpdatePreroll( vlc_tick_t *pi_preroll, const block_t *p )
......
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