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

Steve Lhomme robux4 at ycbcr.xyz
Sun Mar 1 14:28:03 CET 2020


OK although the code could be simplified/more readable later.

> On March 1, 2020 1:11 PM RĂ©mi Denis-Courmont <remi at remlab.net> wrote:
> 
>  
> ---
>  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
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list