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

decoder: cosmetic changes

parent 9531a842
...@@ -1879,20 +1879,23 @@ void input_DecoderDecode( decoder_t *p_dec, block_t *p_block, bool b_do_pace ) ...@@ -1879,20 +1879,23 @@ void input_DecoderDecode( decoder_t *p_dec, block_t *p_block, bool b_do_pace )
bool input_DecoderIsEmpty( decoder_t * p_dec ) bool input_DecoderIsEmpty( decoder_t * p_dec )
{ {
decoder_owner_sys_t *p_owner = p_dec->p_owner; decoder_owner_sys_t *p_owner = p_dec->p_owner;
assert( !p_owner->b_waiting ); assert( !p_owner->b_waiting );
bool b_empty = block_FifoCount( p_dec->p_owner->p_fifo ) <= 0; if( block_FifoCount( p_dec->p_owner->p_fifo ) > 0 )
return false;
bool b_empty;
vlc_mutex_lock( &p_owner->lock );
if( p_owner->fmt.i_cat == VIDEO_ES && p_owner->p_vout != NULL )
b_empty = vout_IsEmpty( p_owner->p_vout );
else if( p_owner->fmt.i_cat == AUDIO_ES && p_owner->p_aout != NULL )
b_empty = aout_DecIsEmpty( p_owner->p_aout );
else
b_empty = true; /* TODO subtitles support */
vlc_mutex_unlock( &p_owner->lock );
if( b_empty )
{
vlc_mutex_lock( &p_owner->lock );
/* TODO subtitles support */
if( p_owner->fmt.i_cat == VIDEO_ES && p_owner->p_vout )
b_empty = vout_IsEmpty( p_owner->p_vout );
else if( p_owner->fmt.i_cat == AUDIO_ES && p_owner->p_aout )
b_empty = aout_DecIsEmpty( p_owner->p_aout );
vlc_mutex_unlock( &p_owner->lock );
}
return b_empty; return b_empty;
} }
......
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