vlc | branch: master | Thomas Guillem <[email protected]> | Wed Jul 25 17:40:25 
2018 +0200| [0b8144effc960db87fd5435d92b9fa9475a65260] | committer: Thomas 
Guillem

dec: reindent and remove useless check

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0b8144effc960db87fd5435d92b9fa9475a65260
---

 src/input/decoder.c | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 8edc410247..0049999d9c 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1286,26 +1286,22 @@ static void DecoderQueueSpu( decoder_t *p_dec, 
subpicture_t *p_spu )
     assert( p_spu );
     struct decoder_owner *p_owner = dec_get_owner( p_dec );
 
-    if( p_owner->p_vout )
+    /* The vout must be created from a previous decoder_NewSubpicture call. */
+    assert( p_owner->p_vout );
+
+    /* Preroll does not work very well with subtitle */
+    vlc_mutex_lock( &p_owner->lock );
+    if( p_spu->i_start != VLC_TICK_INVALID &&
+        p_spu->i_start < p_owner->i_preroll_end &&
+        ( p_spu->i_stop == VLC_TICK_INVALID || p_spu->i_stop < 
p_owner->i_preroll_end ) )
     {
-        /* Preroll does not work very well with subtitle */
-        vlc_mutex_lock( &p_owner->lock );
-        if( p_spu->i_start != VLC_TICK_INVALID &&
-            p_spu->i_start < p_owner->i_preroll_end &&
-            ( p_spu->i_stop == VLC_TICK_INVALID || p_spu->i_stop < 
p_owner->i_preroll_end ) )
-        {
-            vlc_mutex_unlock( &p_owner->lock );
-            subpicture_Delete( p_spu );
-        }
-        else
-        {
-            vlc_mutex_unlock( &p_owner->lock );
-            DecoderPlaySpu( p_dec, p_spu );
-        }
+        vlc_mutex_unlock( &p_owner->lock );
+        subpicture_Delete( p_spu );
     }
     else
     {
-        subpicture_Delete( p_spu );
+        vlc_mutex_unlock( &p_owner->lock );
+        DecoderPlaySpu( p_dec, p_spu );
     }
 }
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to