[vlc-commits] input: use sout_instance_ControlsPace()

Rémi Denis-Courmont git at videolan.org
Sun Mar 1 14:35:39 CET 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar  1 13:35:07 2020 +0200| [42778070f2486df495aa9c437067669069b41213] | committer: Rémi Denis-Courmont

input: use sout_instance_ControlsPace()

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

 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;



More information about the vlc-commits mailing list