[vlc-commits] decoder: cosmetic changes
Rémi Denis-Courmont
git at videolan.org
Sat Mar 21 21:28:41 CET 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 21 21:58:53 2015 +0200| [dce4c3978e52dbd78a7230b5ff8865af0627fe56] | committer: Rémi Denis-Courmont
decoder: cosmetic changes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dce4c3978e52dbd78a7230b5ff8865af0627fe56
---
src/input/decoder.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index aa758b6..452f3f8 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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 )
{
decoder_owner_sys_t *p_owner = p_dec->p_owner;
+
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;
}
More information about the vlc-commits
mailing list