[vlc-commits] input: simplify pace control switch
    Rémi Denis-Courmont 
    git at videolan.org
       
    Sun Mar  1 14:35:42 CET 2020
    
    
  
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar  1 15:35:11 2020 +0200| [48ee5ba209ecb7019147abd8fa0660e057a1dc1d] | committer: Rémi Denis-Courmont
input: simplify pace control switch
(no functional changes)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48ee5ba209ecb7019147abd8fa0660e057a1dc1d
---
 src/input/es_out.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 76dc2f8a64..118c780c95 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2757,16 +2757,10 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
     {
         bool pace = sout_instance_ControlsPace(input_priv(p_input)->p_sout);
 
-        if( !pace && input_priv(p_input)->b_out_pace_control )
-        {
-            msg_Dbg( p_input, "switching to sync mode" );
-            input_priv(p_input)->b_out_pace_control = false;
-        }
-        else if( pace && !input_priv(p_input)->b_out_pace_control )
-        {
-            msg_Dbg( p_input, "switching to async mode" );
-            input_priv(p_input)->b_out_pace_control = true;
-        }
+        if( input_priv(p_input)->b_out_pace_control != pace )
+            msg_Dbg( p_input, "switching to %ssync mode", pace ? "a" : "" );
+
+        input_priv(p_input)->b_out_pace_control = pace;
     }
 
     /* Decode */
    
    
More information about the vlc-commits
mailing list