[vlc-devel] [PATCH 2/5] input: use sout_instance_ControlsPace()

RĂ©mi Denis-Courmont remi at remlab.net
Sun Mar 1 13:11:56 CET 2020


---
 src/input/es_out.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 1c9be081fd..76dc2f8a64 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2755,15 +2755,14 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
     /* Check for sout mode */
     if( input_priv(p_input)->p_sout )
     {
-        /* FIXME review this, proper lock may be missing */
-        if( input_priv(p_input)->p_sout->i_out_pace_nocontrol > 0 &&
-            input_priv(p_input)->b_out_pace_control )
+        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( input_priv(p_input)->p_sout->i_out_pace_nocontrol <= 0 &&
-                 !input_priv(p_input)->b_out_pace_control )
+        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;
-- 
2.20.1



More information about the vlc-devel mailing list