Commit a99d0604 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

decoder: refactor video first picture handling

Video decoders always display their first picture, in a forced state,
bypassing the DecoderWaitUnblock() check. Re-arrange the code to make it
more obvious.
parent 8e7440d5
......@@ -1054,21 +1054,22 @@ static int ModuleThread_PlayVideo( vlc_input_decoder_t *p_owner, picture_t *p_pi
vout_FlushAll( p_vout );
}
if( p_owner->b_waiting && !p_owner->b_first )
if( p_owner->b_first && p_owner->b_waiting )
{
p_owner->b_has_data = true;
vlc_cond_signal( &p_owner->wait_acknowledge );
}
DecoderWaitUnblock( p_owner );
if( p_owner->b_waiting )
{
assert( p_owner->b_first );
msg_Dbg( p_dec, "Received first picture" );
p_owner->b_first = false;
p_picture->b_force = true;
}
else
{
if( p_owner->b_waiting )
{
p_owner->b_has_data = true;
vlc_cond_signal( &p_owner->wait_acknowledge );
}
DecoderWaitUnblock( p_owner );
}
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